Create each of the following as separate classes: Room, Beds, Bath, Suite, SubRoom. Create a single RoomOrSuite class with the i
nstance variables int numBeds, boolean hasBath, and int numSubrooms. Create a Suite class with the instance variables int numBeds, boolean hasBath, and int numSubrooms. Create a subclass Room of Suite which will inherit the instance variables numBeds and hasBath from Room, but not the instance variable int numSubrooms. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a subclass Suite of Room which will inherit the instance variables of Room and has an additional instance variable int numSubrooms. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a separate class Suite with the instance variable int numSubrooms.
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.