Beispiel #1
0
        public static void Main(string[] args)
        {
            SportCar car = new SportCar(10, 100);

            car.Drive(10);
            System.Console.WriteLine(car.Fuel);
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            var skdc     = new Vehicle(2, 5);
            var sportCar = new SportCar(2, 4);

            sportCar.Drive(1);
        }
Beispiel #3
0
        public static void Main(string[] args)
        {
            SportCar vehicle = new SportCar(250, 22.8);

            vehicle.Drive(55.9);
            System.Console.WriteLine(vehicle.Fuel);
        }
Beispiel #4
0
        public static void Main(string[] args)
        {
            SportCar car = new SportCar(300, 20);

            System.Console.WriteLine(car.FuelConsumption);
            car.Drive(2);
        }
Beispiel #5
0
        public static void Main(string[] args)
        {
            var vehicle = new SportCar(250, 1125.00);

            vehicle.Drive(70);

            System.Console.WriteLine(vehicle.Fuel);
        }
Beispiel #6
0
        public static void Main(string[] args)
        {
            FamilyCar newCar = new FamilyCar(100, 100);

            newCar.Drive(25);

            SportCar sportCar = new SportCar(100, 100);

            sportCar.Drive(10);
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            SportCar sCar = new SportCar(80, 3000);

            sCar.Drive(30);

            RaceMotorcycle rM = new RaceMotorcycle(120, 460.987);

            rM.Drive(78.01);
        }
        public static void Main(string[] args)
        {
            Vehicle test1 = new Vehicle(100, 50);

            SportCar test2 = new SportCar(100, 50);
            Car      test3 = new Car(100, 50);

            test1.Drive(5);
            test2.Drive(5);
            test3.Drive(5);

            System.Console.WriteLine(test1.Fuel);
            System.Console.WriteLine(test2.Fuel);
            System.Console.WriteLine(test3.Fuel);
        }
        public static void Main(string[] args)
        {
            SportCar sportCar = new SportCar(100, 28);

            Car car = new Car(100, 20);

            RaceMotorcycle racemotor = new RaceMotorcycle(200, 50);

            racemotor.Drive(2);
            System.Console.WriteLine(racemotor.Fuel);

            car.Drive(6);
            System.Console.WriteLine(car.Fuel);

            sportCar.Drive(2);
            System.Console.WriteLine(sportCar.Fuel);
        }
Beispiel #10
0
        public void Run()
        {
            FamilyCar       familyCar       = new FamilyCar(100, 25.60);
            SportCar        sportCar        = new SportCar(45, 190);
            CrossMotorcycle crossMotorcycle = new CrossMotorcycle(200, 56.30);
            RaceMotorcycle  raceMotorcycle  = new RaceMotorcycle(250, 90.99);

            familyCar.Drive(5);
            sportCar.Drive(10);
            crossMotorcycle.Drive(25);
            raceMotorcycle.Drive(2);

            Console.WriteLine(familyCar);
            Console.WriteLine(sportCar);
            Console.WriteLine(crossMotorcycle);
            Console.WriteLine(raceMotorcycle);
        }
        public static void Main(string[] args)
        {
            SportCar car = new SportCar(200, 100);

            car.Drive(25);
        }