public HomeTheaterFacade(Amplifier amp, Tuner tuner, DvdPlayer dvd, CdPlayer cd, Projector projector,
                          TheaterLights lights, Screen screen, PopcornPopper popper)
 {
     this.amp       = amp;
     this.tuner     = tuner;
     this.dvd       = dvd;
     this.cd        = cd;
     this.projector = projector;
     this.screen    = screen;
     this.lights    = lights;
     this.popper    = popper;
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Amplifier     amp       = new Amplifier();
            Tuner         tuner     = new Tuner();
            DvdPlayer     dvd       = new DvdPlayer();
            CdPlayer      cd        = new CdPlayer();
            Projector     projector = new Projector();
            TheaterLights lights    = new TheaterLights();
            Screen        screen    = new Screen();
            PopcornPopper popper    = new PopcornPopper();

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

            homeTheater.WatchMovie("Raider of the Lost Ark");
            homeTheater.EndMovie();

            RadioFacade radio = new RadioFacade(amp, tuner);

            radio.ListenToRadio(800);
            radio.TurnOffRadio();
        }