Summary
In this chapter, we have begun our journey with object-oriented programming. We have learned many object-oriented concepts and terms, and have seen how C++ has direct language support to implement these concepts. We have seen how C++ classes support encapsulation and information hiding, and how implementing designs supporting these ideals can lead to code that is easier to modify and maintain.
We have detailed class basics, including member functions. We’ve moved deeper into member functions by examining member function internals, including understanding what the this
pointer is and how it works – including the underlying implementation of member functions that implicitly receive a this
pointer.
We have explored access labels and access regions. By grouping our data members in the private
access region and providing a suite of public
member functions to manipulate these data members, we have found that we can provide a safe, well-controlled, and well-tested...