public Tuning(char airConditioneer, char alarmSystem, char parcTronic, Car car) { AirConditioner = airConditioneer; AlarmSystem = alarmSystem; Parctronic = parcTronic; Car = car; }
public void Repair(Car car) { if (car.BattOk == false) { car.BattOk = true; } car.CheckAllSystem(); CashRegister bill = CashRegister.Payd; bill.AddBill(200); Console.WriteLine(" {0,26} Repaired. Please pay:{1,14}", car.Name, bill.BillSize.ToString("C", CultureInfo.CurrentCulture)); //bill.AddBill(200); // Console.WriteLine("please pay:" + bill.BillSize.ToString("C",CultureInfo.CurrentCulture)); bill.ResetCashRegister(); }
public void Check(Car car) { if (car.SystemOk) { Console.WriteLine("Car's systems are OK..." + car.Name); Console.WriteLine(new string('-', 30)); } else { Console.WriteLine("Info=Service is needed - {0,-13} deffect = Battery{1,8}", car.Name, car.BattOk); Console.WriteLine(new string('-', 30)); } }
public static void TunePark(Car car) { ITuning park = new Parctronic(car); park.AddTuning(); }
public static void TuneCar(Car car) { TuneAir(car); TuneAlarm(car); TunePark(car); }
public static void TuneAlarm(Car car) { ITuning alarm = new AlarmSystem(car); alarm.AddTuning(); }
public static void TuneAir(Car car) { ITuning air = new AirConditioner(car); air.AddTuning(); }
private static void UseProxy(Car car1, Car car2, Car car3) { var car = new CarProxy(new Driver("Otto ", true, false), car1); car.Drive(); car = new CarProxy(new Driver("Adolf ", false, true), car2); car.Drive(); car = new CarProxy(new Driver("To-Iama_To_Kanava ", true, true), car3); car.Drive(); Console.WriteLine(new string('-', 30)); }
private static void TuneCar(Car car) { ITuning air = new AirConditioner(car); air.AddTuning(); ITuning alarm = new AlarmSystem(car); alarm.AddTuning(); ITuning park = new Parctronic(car); park.AddTuning(); }