Beispiel #1
0
        static void Main(string[] args)
        {
            Car c = new Car();

            try
            {
                c.Check(true, 2.2, 101.1, true, "Бензин");
                c.Start();
                c.DriveForward(10, true);
                c.DriveForward(20, true);
                c.DriveForward(30, true);
                c.DriveForward(40, true);
                c.DriveForward(50, true);
                c.DriveForward(80, true);
                c.TurnLeft(50);
                c.DriveForward(90, true);
                c.DriveBackward(20, true);
                c.Stop();

                c.TurnLeft(50);
            }
            catch (EngineExceptions e)
            {
                Console.WriteLine(e.Message);
            }
            catch (SpeedExceptions e)
            {
                Console.WriteLine(e.Message);
            }
        }
 public void StartCar()
 {
     _car.Start();
 }