Ejemplo n.º 1
0
		public static void Main (string[] args) {

			CdPlayer player = new CdPlayer();
			CdStart cdStart = new CdStart(player);
			CdStopp cdStopp = new CdStopp(player);

			Garagentor tor = new Garagentor();
			GaragentorHoch hoch = new GaragentorHoch(tor);
			GaragentorRunter runter = new GaragentorRunter(tor);

			RemoteControl rc = new RemoteControl();
			rc.SetCommand(0, cdStart, cdStopp);
			rc.SetCommand(2, hoch, runter);

			rc.PressOn(0);
			rc.PressOn(2);
			rc.PressOff(0);
			rc.PressOff(2);
		}
Ejemplo n.º 2
0
		public CdStart(CdPlayer player) {
			this.player = player;
		}
Ejemplo n.º 3
0
		public CdStopp(CdPlayer player) {
			this.player = player;
		}