Application Modernization: What Is It and How to Get Started
|Bruce Eckel's Thinking in Java||Contents | Prev | Next|
- Create an inheritance hierarchy of Rodent: Mouse, Gerbil, Hamster, etc. In the base class, provide methods that are common to all Rodents, and override these in the derived classes to perform different behaviors depending on the specific type of Rodent. Create an array of Rodent, fill it with different specific types of Rodents, and call your base-class methods to see what happens.
- Change Exercise 1 so that Rodent is an interface.
- Repair the problem in WindError.java.
- In GreenhouseControls.java, add Event inner classes that turn fans on and off.