November 2021
Beginner to intermediate
391 pages
5h 23m
English
It’s a fact of life that objects are quite often composed of other objects (or, in other words, they aggregate other objects). Remember, we agreed to equate aggregation and composition at the start of this part of the book.
There are very few ways for an object to advertise that it’s composed of something. Fields, by themselves, do not constitute an interface unless you make virtual getters and setters. You can advertise classes as being composed of a collection of objects by implementing begin()/end() members, but keep in mind that this doesn’t actually state a lot: after all, you can ...
Read now
Unlock full access