private static void TestVehicleAmphibian() { Motor motor = new Motor(FuelType.Oil, 350); Amphibian amphibian = new Amphibian(2, 6, motor); amphibian.Start(); Console.WriteLine(amphibian.ToString()); amphibian.IncreaseSpeed(20); amphibian.IncreaseSpeed(10); amphibian.IncreaseSpeed(30); Console.WriteLine(amphibian.ToString()); amphibian.GetIntoWater(); Console.WriteLine(amphibian.ToString()); amphibian.DecreaseSpeed(15); Console.WriteLine(amphibian.ToString()); amphibian.GetOntoGround(); Console.WriteLine(amphibian.ToString()); amphibian.Stop(); Console.WriteLine(amphibian.ToString()); }
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(); }