Hi All,
Thanks for the responses.
I'm new to Java and Design patterns.I would like to implement the Adapter design pattern for the below BusinessCase.
The case goes like this
A power switch is required that can turn on or off any number of appliances. An appliance is for example a Blender, a Toaster, or an Oven.
Other programmers have already written those appliances and you can't change their source code (to, for example, require them all to implement a particular interface).
Fortunately, each such appliance already has two methods to turn its particular appliance on and off.
Unfortunately, all such methods were written by different people and have different names (examples: Blender.swizzle(), Toaster.startToasting(), Oven.heatUp()).
write three third party appliances and put them in a separate package. It should be visible from the output of each appliance whether it is turned on or off (in its third party vocabulary).
-Make a representation of a multi-power point. You can plug in as many appliances as you wish and turn them on and off all at once, by turning the multi-power point on() and off().
I would appreciate for any help.
Any class diagrams would be of great help.
Thanks
*** HOMEWORK ASSIGNMENT NOTICE ***
This message was edited 1 time. Last update was at by James Clark
Abhi Kumar, your post contains material which resembles a homework assignment. If it is, you should try to complete the
assignment on your own. If you run into specific problems, then posting a question is reasonable. However, expecting
complete answers is not.