Question: java 2. a) Create an abstract class called Room. This class has 3 attributes: xCoordinate yCoordinate zCoordinate . You will have to decide the type

 java 2. a) Create an abstract class called Room. This class

java

2. a) Create an abstract class called Room. This class has 3 attributes: xCoordinate yCoordinate zCoordinate . You will have to decide the type of these attributes. The Room class also has an abstract method called open, and another abstract method called close. b) Create two concrete classes that are children of the Room class, called Kitchen and Bedroom. A concrete class (representing concrete rooms) has 2 additional attributes in addition to the attributes of its parent class. Also, when a concrete class implements the open method, it contains code to print the message Room [insert number here) opened! and when it implements the close method, it contains code to print the message Room (insert number here) closed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!