Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

BLUF

A class is a non-primitive or user-defined data type in C++, while an object is an instance of a class. A class is a collection of a fixed number of components. The components of a class are called the members of the class. For example: in real life, a car is an object. The car has attributes, such as weight and color, and methods, such as drive and brake. A Class is like an object constructor, or a "blueprint" for creating objects.

\uD83D\uDCD8 Learning Objective

  • Learn about classes, 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

  • Learn about information hiding

  • Explore how information hiding is implemented in C++

  • Learn about the static members of a class

This Chapter 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++.

\uD83D\uDCCB Assignments

  • Complete the Active Reading in the Zybooks Chapter: Classes and Objects

  • Review Class notes

  • Complete Lab 1 and 2

  • No labels