April 2022
Intermediate to advanced
1012 pages
38h 1m
English
Objectives
In this chapter, you’ll:
Define a custom class and use it to create objects.
Implement a class’s behaviors as member functions and attributes as data members.
Access and manipulate private data members through public get and set functions to enforce data encapsulation.
Use a constructor to initialize an object’s data.
Separate a class’s interface from its implementation for reuse.
Access class members via the dot (.) and arrow (->) operators.
Use destructors to perform “termination housekeeping” on objects that go out of scope.
Assign the data members of one object to those of another.
Create objects composed of other objects.
Use friend functions and declare friend classes.
Access non-static class members via ...