public Amphibian(int displacement, int wheelsCount, OilMotor motor) : base() { Displacement = displacement; WheelsCount = wheelsCount; Enviroment = Enums.MovementEnviroment.ground; VehicleMotor = motor; }
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(); }
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(); }
public Ship(int displacement, OilMotor motor) : base(displacement) { VehicleMotor = motor; }