Example #1
0
        static void Main(string[] args)
        {
            Screen       mipantalla   = new Screen();
            Amplificador amplificador = new Amplificador();
            CDPlayer     micdplayer   = new CDPlayer(amplificador);
            DVDPlayer    midvdplayer  = new DVDPlayer(amplificador);

            amplificador.setCD(micdplayer);
            amplificador.setDVD(midvdplayer);
            Speakers misbocinas = new Speakers();
            facade   myfacade   = new facade();

            myfacade.setAmplificador(amplificador);
            myfacade.setCDPlayer(micdplayer);
            myfacade.setDVDPlayer(midvdplayer);
            myfacade.setPantalla(mipantalla);
            myfacade.setSpeakers(misbocinas);
            Console.WriteLine("-Ver pelicula-");
            myfacade.mirarPelicula();
            Console.WriteLine("-Escuchar CD-");
            myfacade.escucharCD();
            Console.WriteLine("-Ve pelicula en CINEMA-");
            myfacade.peliculaCinema();

            Console.ReadKey();
        }
Example #2
0
 public void setSpeakers(Speakers speak)
 {
     this.bocinas = speak;
 }