Hour 12. Making the Most of Existing Objects

What You’ll Learn in This Hour:

• Designing superclasses and subclasses

• Forming an inheritance hierarchy

• Overriding methods

Java objects are ideally suited for childbearing. 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 behavior of the parent. They also can do some things differently than the parent.

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 hour.

Another useful aspect of OOP is the capability to create an object that you can use with different programs. Reusability makes it easier to develop error-free, reliable programs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.254.61