subject

Create a parent class called “Home.” 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 “Home”. 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. Be
sure to locate methods in the appropriate hierarchy. If functionality is common across all “Entertainment” devices, 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 "Home. 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 should control one or more devices.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:00, eguzmandpandoracom
How do we use the sumif formula (when dealing with different formats) ?
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, alannaamarriee
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
image
Computers and Technology, 23.06.2019 14:00, shawn423
How are stop motion special effects in animated films created
Answers: 1
image
Computers and Technology, 23.06.2019 15:20, manarhizam12
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
You know the right answer?
Create a parent class called “Home.” This should have methods and variables to access and change the...

Questions in other subjects:

Konu
Mathematics, 05.05.2020 18:21