Question: Programming Assignment 2 Smart Home continued You may have noticed that the Smart Home application we built in the last assignment was a little clumsy

Programming Assignment 2 Smart Home continued You may have noticed that the Smart Home application we built in the last assignment was a little clumsy to implement. If we keep adding new devices, variables will be harder to track, and settings will be harder to manage. You may also notice that certain parts of the Smart Home could be grouped into different categories (for example, both the Music and Television devices shared audio settings). We could make our program more efficient and capable of growth by using inheritance. Object-oriented design to the rescue! Here are your program requirements for your revised Smart Home: 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

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!