Question: write java code using java swing Home Automation with exception handling (20 marks) Home automation is becoming popular with homeowners these days. The short explanation

write java code using java swing

Home Automation with exception handling (20 marks) Home automation is becoming popular with homeowners these days. The short explanation of it is that you control several electronic devices from a central hub, usually an app on your phone or computer. You will be creating a GUI that will control at least 2 different types of devices. See the following example:

write java code using java swing Home Automation with exception handling (20

In this app you will need to control at least two different classes of devices, so for my example, I have used lights and TV, however you may pick any electronic device that you may want to control. For each device I would like you to have at least two controls, however feel free to add more to make it make sense where applicable. Each device should update an element of the GUI via the action listeners for the buttons. So for example on the lighting control, and example of modifying the GUI might be changing the light bulb image from and off light bulb to an on light bulb, and for the TV example, pushing channel up increases the number in the current channel field. Each device should also have 2 exception cases which should be handled and should prompt the user in some way. So for example, the light bulb case turning on the lights when the lights are already on should throw an exception which prompts the user to let them know that the lights are already on, and a similar situation if they try to turn off the lights that are already off.

Home Automation app Lighting Control Turn Lights on Lights en Turn Lights Off TV Control TurnTV Current Channel Channel Up Channel Down Turn TV Off 0 4

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!