//static RcCar rcTwo; static void Main(string[] args) { rcOne = new RcCar("Sony", "Magenta", 100, true); Console.WriteLine(rcOne.ToString()); rcOne.ChangeSpeed = (int)Speed.HyperSpeed; Console.WriteLine(rcOne.ToString()); Console.ReadKey(); }
static void Main(string[] args) { RcCar rcFull = createRcFull(); rcFull.Color = "Green"; rcFull.Go(); rcFull.DisplayBatteryPower(); rcFull.ChargeBattery(); rcFull.PowerOnOff(); rcFull.Go(); rcFull.DisplayBatteryPower(); Console.WriteLine(rcFull.ToString()); RcCar rcReg = createRcReg(); rcReg.Color = "Purple"; rcReg.Go(); rcReg.DisplayBatteryPower(); rcReg.ChargeBattery(); rcReg.PowerOnOff(); Console.WriteLine(rcReg.ToString()); RcCar rc = new RcCar(); rc.Color = "Orange"; rc.Go(); rc.DisplayBatteryPower(); rc.ChargeBattery(); rc.PowerOnOff(); Console.WriteLine(rc.ToString()); Console.ReadKey(); }