-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathhome_theatre.py
28 lines (22 loc) · 1006 Bytes
/
home_theatre.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from facade.home_theatre_facade import HomeTheaterFacade
from subcomponents.separates import Amplifier, Tuner, StreamingPlayer, Projector, Screen, TheaterLights, PopcornPopper
def theatre_test_drive():
amp = Amplifier("Amplifier")
tuner = Tuner("AM/FM Tuner", amp)
player = StreamingPlayer("Streaming Player", amp)
# cd = CdPlayer("CD Player", amp)
projector = Projector("Projector", player)
lights = TheaterLights("Theater Ceiling Lights")
screen = Screen("Theater Screen")
popper = PopcornPopper("Popcorn Popper")
home_theater = HomeTheaterFacade(amp, tuner,
player,
projector,
screen,
lights,
popper
)
home_theater.watch_movie("Raiders of the Lost Ark")
home_theater.end_movie()
if __name__ == '__main__':
theatre_test_drive()