Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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) closedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started