| Chapter 7 |
Inheritance
|
||||||||||||||||
|
|
|||||||||||||||||
| Chapter Objectives • Derive new classes from existing ones. • Explain how inheritance supports software reuse. • Add and modify methods in child classes. • Discuss how to design class hierarchies. • Define polymorphism and how it can be done. • Discuss the use of inheritance in Java GUI framework. • Examine and use the GUI component class hierarchy. |
Chapter Objectives I. Object Oriented Program Design |
||||||||||||||||
|
|||||||||||||||||
| Carlot program
1. Main method called Carlot 2. Construct a parent class that makes car objects with make, year, and color 3. Construct a child classes that makes car objects that also has model info. 4. print out what cars are in the lot-also print out all the descriptions. |
|||||||||||||||||