Inheritance is used to implement an "is a" type of object relationship (for example, a Square is a type of Shape). In this lab, you have the following inheritance hierarchy:
The base class is called Residence and the derived classes are House, Apartment, and Tent. The classes House, Apartment, and Tent inherit from the Residence class; thus they are more specialized versions of Residence.
The Residence class has private data members for storing:
- The number of rooms
- The number of walls
- A boolean for whether or not a Residence has a washer