• Unit 4: Object-Oriented Programming

    In this unit, you will learn how to design a class, which is an expanded concept of a data structure that can hold both data and functions. An object is an instantiation of a class, so a class would be the type, and an object would be the variable. Next, we will learn how to handle private and protected members of a class, which is important for sound class design. This unit covers a key feature of C++ classes: inheritance. Inheritance allows classes to inherit objects and functions from other classes. In this unit, we will learn how classes can inherit members from more than one class. We will end this unit with the study of polymorphism or the ability to create a variable, a function, or an object that has more than one form. This brings object-oriented methodologies to their full potential.

    Completing this unit should take you approximately 8 hours.

    • 4.1: Class Design

    • 4.2: Inheritance between Classes

    • 4.3: Polymorphism

    • Unit 4 Exercises