Part 3: Object-Oriented Programming with Aggregation and Inheritance

This part of the book continues the discussion of techniques of object-oriented programming. C++ adds to the programmer's toolbox such powerful techniques as class composition and class inheritance, and some programmers feel at a loss deciding which technique to use and how to avoid any unpleasant increase in program complexity.

Chapter 12, "Composite Classes: Pitfalls and Advantages," describes the syntax of using objects as members of another class, specifies the rules of access to these objects and to their data members, and explains how to initialize components of the composite object. It introduces the techniques of sharing object components through reference members ...

Get Core C++ A Software Engineering Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.