Answer:
Step-by-step explanation:
The following is written in Java and creates each one of the classes as requested. They can be used as seperate files within the same package but for the sake of simplicity, I am adding them together in this answer.
class RoomOrSuite {
int numBeds;
boolean hasBath;
int numSubrooms;
}
class Room {
int numBeds;
boolean hasBath;
}
class Beds {
}
class Bath {
}
class Suite {
int numBeds;
boolean hasBath;
private int numSubrooms;
}
class SubRoom {
}
class RoomOfSuite extends Room{
}
class SuiteOfRoom extends Room {
int numSubrooms;
}