Implementing Subclasses
Top-level form of the OxfordShirtInfo class definition:
class OxfordShirtInfo: public ItemInfo { ... }
The part in red indicates that:
- ItemInfo is the base class (superclass) of OxfordShirtInfo
- OxfordShirtInfo can access the public members of ItemInfo
Note that although OxfordShirtInfo cannot access the private instance
variables price and color directly, it can get their values
through the public getPrice and getColor accessor methods.