Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions