| Inheritance Inner Classes |
| Similar, yet Different, Concepts |
| Inner Classes |
| Ways to Construct ClosedList |
| Interpretation of Identifiers |
| Usage |
| Exporting Inner Objects |
| Example: List Iterator |
| Example: List Iterator (2) |
| ClosedList.Iterator |
| ClosedList.Iterator:
remove() Defined to remove the value just produced by next(). |
| Test Program |
| Test Program |
| Test Program Output |
| Inheritance |
| Diagrammatic Notation (UML) |
| Inherited Capabilities |
| Purposes of Inheritence |
| Extension = Java Inheritance |
| Extension Example |
| Slide 21 |
| Slide 22 |
| Slide 23 |
| Multiple derived classes |
| Which methods can be over-ridden? |
| Inheritance Examples abound in Java Libraries |
| Implications of Inheritance |
| Methods of java.util.Stack |
| Testing where Object is in Hierarchy |
| Casting |
| class Object |
| Implementing an
Interface is similar to Inheritance |
| Example |
| Abstract Classes |
| Abstract Classes in Java |
| Abstract Methods |
| Abstract Class Example: Tree |
| Tree in Java |
| Adding a Method to Tree |
| leafCount in the base class |
| leafCount in the Derived Classes |
| Abstract Class vs. Interface |
| Multiple Inheritance |