Question: 1 Context Facade is a structural design pattern that provides a simplified (but limited) interface to a complex system of classes, library or framework. A

1 Context Facade is a structural design pattern that provides a simplified (but limited) interface to a complex system of classes, library or framework. A facade can improve the readability and usability of a software library by masking interaction with more complex components behind a single (and often simplified) API or provide a context-specific interface to more generic functionality (complete with context-specific input validation). Also, it serve as a launching point for a broader refactor of monolithic or tightlycoupled systems in favor of more loosely-coupled code.

2 Problem description Suppose You like to control your home appliances with the help of a Smart Remote. The Home Appliances will act as receiver here. Smart Remote will act as an invoker. To make it little user-friendly, I am trying here to provide command as statement like turn on bedroomlight or bedroomlight switch off. Woow. Thats interesting :) You want to control your smart devices such as a fan, TV, music system, light, coffee machine, electric grill, refrigerator, microwave, light in your home, some of which are in the living room and some in the kitchen. But some devices can be in both rooms, for example the light. The functions used in the controlled light in the living room may be different in the kitchen or additional features may be required. You should consider functions such as volume or power reduction and increase, which are available in many devices. For example; changing the channel on the TV, reducing the volume or turning it to mute, turning on the grill of the microwave, setting the timer to adjust the temperature while cooking, changing the modes of the refrigerator, etc. Yaay, you are having a party at home with friends !!! You should write your Facade class to describe your Weekend House Party operations, as you have a variety of appliances for entertainment and food at home. play a movie set the refrigerator to party mode to quickly cool drinks at the party preparing meals, keeping the oven working stop the movie when the party is over preparing the kitchen, such as turning off the grill, returning the refrigerator to its old mode

1 Context Facade is a structural design pattern

You are expected to implement necessary classes for this example using Facade Pattern. Output should be as in the pictures. Weekend: Enjoying with friends and family at home... Setting up movie... Turning On 'Living RoomFan' Encreasing Speed of 'Living RoomFan' to '2'. Turning On 'Living RoomLight' Turning On 'Living Room TV'|| Setting Source of 'Living RoomTV' to 'HDMI ARC'. Turning On 'Living RoomFireTV4KStick' Turning On 'Living RoomSoundBar' Setting Sound-Mode of 'Living RoomSoundBar' to 'Dolby Atmos'. Opening 'Netflix' on 'Living RoomFireTV4Stick'. Searching Spider-Man: Far From Home' on 'Netflix'. Dimming 'Living RoomLight'. Setting volume of 'Living RoomSoundBar' to '20'. Playing 'Spider-Man: Far From Home' on 'Netflix'. Preparing food... Turning On 'KitchenLight' Setting 'Refrigerator' Cooling to 'Party'. Turning On 'Microwave' Setting 'Microwave' on Pre-Heat, temprature '200', time '5' minutes. Turning on grill of 'Microwave'. Turning On 'ElectricGrill' Turning On 'CoffeeMaker' Baking 'Napoletana Pizza' in 'Microwave' for temprature '400', time '10' minutes. Baking 'Margherita Pizza' in 'Microwave' for temprature '400', time '10' minutes. Baking 'Marinara Pizza' in 'Microwave' for temprature '400', time '10' minutes. Baking 'Chicago-Style Deep Dish Pizza' in 'Microwave' for temprature '400', time '10' minutes. Enjoy Movie with Meal and Drink... Movie Completed. Stopping Movie... Closing 'Netflix' on 'Living RoomFireTV4KStick'. You are expected to implement necessary classes for this example using Facade Pattern. Output should be as in the pictures. Weekend: Enjoying with friends and family at home... Setting up movie... Turning On 'Living RoomFan' Encreasing Speed of 'Living RoomFan' to '2'. Turning On 'Living RoomLight' Turning On 'Living Room TV'|| Setting Source of 'Living RoomTV' to 'HDMI ARC'. Turning On 'Living RoomFireTV4KStick' Turning On 'Living RoomSoundBar' Setting Sound-Mode of 'Living RoomSoundBar' to 'Dolby Atmos'. Opening 'Netflix' on 'Living RoomFireTV4Stick'. Searching Spider-Man: Far From Home' on 'Netflix'. Dimming 'Living RoomLight'. Setting volume of 'Living RoomSoundBar' to '20'. Playing 'Spider-Man: Far From Home' on 'Netflix'. Preparing food... Turning On 'KitchenLight' Setting 'Refrigerator' Cooling to 'Party'. Turning On 'Microwave' Setting 'Microwave' on Pre-Heat, temprature '200', time '5' minutes. Turning on grill of 'Microwave'. Turning On 'ElectricGrill' Turning On 'CoffeeMaker' Baking 'Napoletana Pizza' in 'Microwave' for temprature '400', time '10' minutes. Baking 'Margherita Pizza' in 'Microwave' for temprature '400', time '10' minutes. Baking 'Marinara Pizza' in 'Microwave' for temprature '400', time '10' minutes. Baking 'Chicago-Style Deep Dish Pizza' in 'Microwave' for temprature '400', time '10' minutes. Enjoy Movie with Meal and Drink... Movie Completed. Stopping Movie... Closing 'Netflix' on 'Living RoomFireTV4KStick

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 General Management Questions!