public Form1() { InitializeComponent(); bicycleSubject = new BicycleSubject(0); rpmObserver = new RPMObserver(lbDisplayRPM, bicycleSubject); kphObserver = new KPHObserver(lbKPH, bicycleSubject); cphObserver = new CPHObserver(lbCalPerHour, bicycleSubject); }
public BicycleObserver(Label displayLabel, BicycleSubject bicycleSubject) { this.displaylabel = displayLabel; currentRPM = 0; this.bicycleSubject = bicycleSubject; currentValue = 0; bicycleSubject.AddObserver(this); }
public RPMObserver(Label displayLabel, BicycleSubject bicycleSubject) : base(displayLabel, bicycleSubject) { }
public KPHObserver(Label displayLabel, BicycleSubject bicycleSubject) : base(displayLabel, bicycleSubject) { }