In This Chapter
• Design superclasses and subclasses
• Form an inheritance hierarchy
• Override methods
Java objects can have kids. When you create an object—a set of attributes and behavior—you have designed something that’s ready to pass these qualities on to offspring. These child objects take on a lot of the same attributes and behaviors as their parents. They also can do some things differently from their parents.
This system is called inheritance, and it’s something every superclass (parent) gives to its subclasses (children). Inheritance is one of the most useful aspects of object-oriented programming (OOP), and you learn about it during this chapter.
Another useful aspect of OOP is the capability ...