Exemple #1
0
 public HomeTheaterFacade(Amplifier amp,
                          Tuner tuner,
                          StreamingPlayer player,
                          Projector projector,
                          Screen screen,
                          TheaterLights lights,
                          PopcornPopper popper)
 {
     this.amp       = amp;
     this.tuner     = tuner;
     this.player    = player;
     this.projector = projector;
     this.screen    = screen;
     this.lights    = lights;
     this.popper    = popper;
 }
Exemple #2
0
        public static void Test()
        {
            Amplifier       amp       = new Amplifier("Amplifier");
            Tuner           tuner     = new Tuner("AM/FM Tuner", amp);
            StreamingPlayer player    = new StreamingPlayer("Streaming Player", amp);
            CdPlayer        cd        = new CdPlayer("CD Player", amp);
            Projector       projector = new Projector("Projector", player);
            TheaterLights   lights    = new TheaterLights("Theater Ceiling Lights");
            Screen          screen    = new Screen("Theater Screen");
            PopcornPopper   popper    = new PopcornPopper("Popcorn Popper");

            HomeTheaterFacade homeTheater =
                new HomeTheaterFacade(amp, tuner, player,
                                      projector, screen, lights, popper);

            homeTheater.watchMovie("Raiders of the Lost Ark");
            homeTheater.endMovie();
        }
Exemple #3
0
 public Tuner(string description, Amplifier amplifier)
 {
     this.description = description;
 }
Exemple #4
0
 public StreamingPlayer(string description, Amplifier amplifier)
 {
     this.description = description;
     this.amplifier   = amplifier;
 }