Advanced Topics in Classes and Objects
So far, this chapter has provided a basic introduction to object-oriented programming by taking a glimpse at classes, objects, attributes, and operations. This next section will illustrate some of the more advanced topics. In object-oriented programming, advanced topics include inheritance and polymorphism. Although inheritance and polymorphism are basic necessities in any object-oriented language, they are some of the more difficult things to understand for beginners. In the next few sections, you will take a look at inheritance and polymorphism, and their uses.
Inheriting from Base Classes
When applied to object-oriented programming, inheritance means that if a class inherits from a base class, it inherits ...