Let’s get your Java foundations solidified by examining a real house... the house of the future! In this exercise, imagine you’ve been tasked with creating a system that coordinates all the elements...

1 answer below »

Let’s get your Java foundations solidified by examining a real house... the house of the future! In this exercise, imagine you’ve been tasked with creating a system that coordinates all the elements of a “Smart Home.” These are homes that have built-in automation that handles the lighting, temperature, entertainment, and myriad appliances to make your life easier and more efficient. Not only are these things controlled remotely, but they often work together for a more seamless experience. Start first by creating a new class called SmartHome.java. Inside your main function, you should do the following: Accept user console input. It should take in the following commands:


•“Change temperature”


• “Play music”


•“Stop music”


• “Turn on television”


•“Turn off television”


•“Turn on light”


•“Turn off light”


•“Make a call”


•“Answer doorbell”


•“Close system”


Create instance variables that represent the following (use appropriate data types):


•Temperature


•A/C setting


•Is music playing? (yes/no)


•Is the television on? (yes/no)


•Music track selected


•Television channel selected


•Room light settings


Here are some requirements about how your system should operate:


•When a user enters a command, the program should provide confirmation that the command has been executed


•Set the appropriate variables to the corresponding user input•


If the user is changing the light, ask him/her which room it should be for. Track the light in the following rooms (bedroom, kitchen, living room, bathroom, garage)


•If the user is changing the temperature, ask him/her what temperature he/she would like. If the new temperature is higher than the previous, put the A/C setting at “heat.” If the new temperature is lower than the previous, put the A/C at “cool.”


•If the user is changing the music, ask him/her which song he/she would like.


Create a text file called “songs.txt” that has at least five different songs.


Read the file list and check if the user’s request is there. If it isn’t, tell the user what songs are available. If it is, begin playing that song


•If the user is turning on the TV, ask him/her which channel he/she would like. Create a text file called “channels.txt” that has at least five different channels.


Read the file list and check if the user’s request is there. If it isn’t, tell the user what channels are available. If it is, turn the TV to that channel


•If the user makes a call, turn off any electronics that are providing audio. Ask the user what number he/she wants to call. If the number is not a 10-digit number, tell him/her the format was incorrect and to try again


•If the user answers the doorbell, turn off any other audio. Ask the user to input a message to send to the person waiting at the door


•If the user requests the television be turned on, provide a follow-up question: “Would you like the lights dimmed?” If the living room lights are on, turn them off.


•Create a method that shuts the system down. This will be called when the user says, “Close system.” It will reset all room settings and turn off any appliances. (Imagine this happening when the owner leaves for the day)


For all assignments and exercises submissions should be done as a packaged zip file that contains the following: all .java and .class files from your project and a screenshot of the code operating on your computer. You can save this image as a .jpg or .png. Name the zip file submission in the format:
NAME_COURSE_ASSIGNMENT_DATE.zip


Kenneth Rojas, CIS 2503, SmartHome, date

Answered 1 days AfterSep 01, 2021

Answer To: Let’s get your Java foundations solidified by examining a real house... the house of the future! In...

Kshitij answered on Sep 03 2021
126 Votes
Channels.txt
ABC
CBS
The CW
ESPN...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here