static void Main(string[] args)
        {
            var amp       = new Amplifier();
            var tuner     = new Tuner();
            var dvd       = new DvdPlayer();
            var cd        = new CdPlayer();
            var projector = new Projector();
            var screen    = new Screen();
            var lights    = new TheaterLights();
            var popper    = new PopcornPopper();

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

            homeTheater.WatchMovie("Raider of the Lost Ark");
            homeTheater.EndMovie();
        }
        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();

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

            homeTheater.watchMovie("Raiders of the Lost Ark");
            homeTheater.endMovie();
        }
 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.lights    = lights;
     this.screen    = screen;
     this.popper    = popper;
 }
Example #4
0
        static void Main(string[] args)
        {
            Amplifier amp = new Amplifier("Top-O-Line Amplifier");
            Tuner tuner = new Tuner("Top-O-Line AM/FM Tuner", amp);
            DvdPlayer dvd = new DvdPlayer("Top-O-Line DVD Player", amp);
            CdPlayer cd = new CdPlayer("Top-O-Line CD Player", amp);
            Projector projector = new Projector("Top-O-Line Projector", dvd);
            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, dvd, cd, projector, lights, screen, popper);

            homeTheater.watchMovie("Raiders of the Lost Ark");
            homeTheater.endMovie();

            Console.ReadLine();
        }
Example #5
0
        static void Main(string[] args)
        {
            Amplifier     amp       = new Amplifier("Top-O-Line Amplifier");
            Tuner         tuner     = new Tuner("Top-O-Line AM/FM Tuner", amp);
            DvdPlayer     dvd       = new DvdPlayer("Top-O-Line DVD Player", amp);
            CdPlayer      cd        = new CdPlayer("Top-O-Line CD Player", amp);
            Projector     projector = new Projector("Top-O-Line Projector", dvd);
            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, dvd, cd, projector, lights, screen, popper);

            homeTheater.watchMovie("Raiders of the Lost Ark");
            homeTheater.endMovie();

            Console.ReadLine();
        }
 public HomeTheaterFacade(
     Amplifier amplifier,
     Tuner tuner,
     DvdPlayer dvdPlayer,
     CdPlayer cdPlayer,
     Projector projector,
     TheaterLights theaterLights,
     Screen screen,
     PopcornPopper popcornPopper)
 {
     _amplifier     = amplifier;
     _tuner         = tuner;
     _dvdPlayer     = dvdPlayer;
     _cdPlayer      = cdPlayer;
     _projector     = projector;
     _theaterLights = theaterLights;
     _screen        = screen;
     _popcornPopper = popcornPopper;
 }
Example #7
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Enter the name of a Movie you would like to watch: ");
            var movie = Console.ReadLine();

            var amp       = new Amplifier("Denon Amplifier");
            var dvd       = new DvdPlayer("Blu Ray Player", amp);
            var projector = new Projector("Epson Projector", dvd);
            var lights    = new TheaterLights("Rad Lights");
            var screen    = new Screen("Silver Ticket 100 Movie Screen");
            var popper    = new PopcornPopper("Pop Pop!");

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

            Console.WriteLine(homeTheater.WatchMovie(movie));
            Console.WriteLine("Please press Enter when movie has ended.");
            Console.ReadKey();
            Console.WriteLine(homeTheater.EndMovie());

            Console.ReadKey();
        }
Example #8
0
 public CdPlayer(string description, Amplifier amplifier)
 {
     this.description = description;
     this.amplifier = amplifier;
 }
Example #9
0
 public DvdPlayer(string description, Amplifier amplifier)
 {
     this.description = description;
     this.amplifier   = amplifier;
 }
Example #10
0
 public Tuner(string description, Amplifier amplifier)
 {
     this.description = description;
 }
Example #11
0
 public Tuner(string description, Amplifier amplifier)
 {
     this.description = description;
 }