Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose you have to write a program that will work as the single controlling mechanism for switching off / on your home appliances. If you
Suppose you have to write a program that will work as the single controlling
mechanism for switching off on your home appliances.
If you will go to the office, then it will do following operations:
Switch OFF Lights
Switch OFF TV
Enable Home Security System
Again when you will come back to home from office then following operations will
be performed:
Switch ON Lights
Switch ON TV
Disable Home Security System
Following classes were implemented for this system. Lights. TV
HomeSecurtiySystem, are subsystem classes and class namely provides an
interface for client to access complex subsystem.
What is the name of this design pattern?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started