Overview
Chapter 10 introduces a structured data type called a class, which is specifically
designed to group data and functions. After examining its structure, students will learn
how to create and use classes. The typical members of a class will be discussed,
including accessors, mutators, constructors, and destructors. We will define the
properties of these members, such as private, protected, public, and static.
Students will also learn about abstract data types and how classes are used to implement
them. In the process, they will be introduced to the concept of information hiding.
Finally, we will discuss information hiding as implemented in C++.
Objectives
In this chapter, the student will:
• Learn about classes
• Learn about private, protected, and public members of a class
• Explore how classes are implemented
• Become aware of accessor and mutator functions
• Examine constructors and destructors
• Learn about the abstract data type (ADT)
• Explore how classes are used to implement ADTs
Teaching Tips
Classes
1. Review the concepts of object-oriented design discussed in Chapter 1, including the
definition of an object.