Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Hierarchies CS133: Developing Programming Principles Lecture 14 Class hierarchies, super/subclasses, calling superclass constructors, overriding methods • Information may be organized in a nonlinear manner. • Hierarchies represent dependencies or relationships in a non-linear, tree-like structure. • Examples: – People/Students/Co-op students – Classification of matter CS133 Course Notes Lecture 14, Slide 2 1 2 Example Person Another example Matter Student Instructor Mixtures Pure substances Co-op Student Grad Student Heterogeneous Homogeneous Compounds Elements CS133 Course Notes Lecture 14, Slide 3 CS133 Course Notes Lecture 14, Slide 4 3 4 Observations • Notice that the root of the hierarchy is the most general (Person, Matter) • As we move down through the tree, we become more specific – The attributes become increasingly welldefined....
View Full Document

This note was uploaded on 07/17/2010 for the course CS 133 taught by Professor Kierstead during the Fall '07 term at Waterloo.

Ask a homework question - tutors are online