Before we continue working with classes, let's take a moment to cover what exactly makes object-oriented programming, object oriented. Definintions differ based on where you search, but you will undoubtedly come across the following terms: Encapsulation, Inheritance, Polymorphismm, and Abstraction. This video will explain these terms.
Let's add some memers to our new Dog class, and get a better idea of how inheritance works.
Review Questions
The following are examples of questions similar to what you can expect to see on the next exam.
- What is encapsulation? The capability of grouping methods and data into logical components.
- What is inheritance? The capability of deriving one class from another.
- What is syntax for inheriting from a class? class ChildClass : public ParentClass