Question

Create a parent class called "Device." This should have methods and variables to access and

change the power status and the room they are located in

Create Child Classes called "Entertainment," "Appliance," "Security," and "Light." These should

all inherit from "Device"

Create Child Classes that inherit from "Entertainment" that include "Music" and "Television"

Create Child Classes that inherit from "Appliance" that include "HVAC," "Oven," and

"Refrigerator"

Create Child Classes that inherit from "Security" that include "MotionSensor" and "Camera"

• Each class should have constructors and member variables. Keep variables private; only allow

methods to access them

Populate each class with relevant functionality (you can use Assignment 1 for some insight). Be

sure to locate methods in the appropriate hierarchy. If functionality is common across all

"Entertainment" devices (such as "changeVolume()"), then put that in the "Entertainment"

class. If something is unique to "Television," then put it in that class

Instantiate at least one instance of the following in your main program: Light, Music, Television,

HVAC, Oven, Refrigerator, MotionSensor, and Camera. This should be in a new file called

"SmartHome2.java"

As with the previous assignment, allow users the ability to input specific commands. You should

have at least 12 distinct commands of your choosing; however, one of them should be "Help."

When the user types "Help," have the system print out all commands for reference. Each

command (except for "Help") should control one or more Smart Home devices.

Include appropriate comments throughout your code. Remember to use standard Java naming

conventions. Put your name and information about the program at the beginning of your program.

Submit your SmartHome2.java, all other Class and Java files in your project, and a screenshot of it in

operation on your computer. Package all of these in a zip file and name the submission in the format:

NAME_COURSE_ASSIGNMENT_DATE.zip

Question image 1