Esempio n. 1
0
 public Amphibian(int displacement, int wheelsCount, OilMotor motor) : base()
 {
     Displacement = displacement;
     WheelsCount  = wheelsCount;
     Enviroment   = Enums.MovementEnviroment.ground;
     VehicleMotor = motor;
 }
Esempio n. 2
0
        private static void TestShip()
        {
            OilMotor motor = new OilMotor(550);
            Ship     ship  = new Ship(340, motor);

            Console.WriteLine("Ship:");
            ship.Start();
            ship.Accelerate(10);
            ship.Decelerate(5);
            Console.WriteLine(ship.ToString());

            ship.Stop();
        }
Esempio n. 3
0
        private static void TestAmphibian()
        {
            OilMotor  motor     = new OilMotor(650);
            Amphibian amphibian = new Amphibian(500, 4, motor);

            Console.WriteLine("Amphibian:");
            amphibian.Start();
            amphibian.Accelerate(30);
            Console.WriteLine(amphibian.ToString());

            amphibian.GetIntoWater();
            amphibian.Accelerate(10);
            Console.WriteLine(amphibian.ToString());

            amphibian.Decelerate(5);
            amphibian.GetOntoGround();
            Console.WriteLine(amphibian.ToString());

            amphibian.Stop();
        }
Esempio n. 4
0
 public Ship(int displacement, OilMotor motor) : base(displacement)
 {
     VehicleMotor = motor;
 }