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); }
public GaragentorHoch(Garagentor tor) { this.tor = tor; }
public GaragentorRunter(Garagentor tor) { this.tor = tor; }