Example #1
0
        static void Main(string[] args)
        {
            Vehicle cleanVehicle = new Vehicle();
            cleanVehicle.Make = "VW";
            printVehicleDetails(cleanVehicle);
            Console.ReadLine();

            Vehicle myVehicle = new Vehicle("BMW", "850CSI", "Racing Green", 1991);
            printVehicleDetails(myVehicle);
            Console.ReadLine();

            Car myCar = new Car("Audi", "A8", "Blue metallic", 2003,4);
            printVehicleDetails(myCar);
            Console.ReadLine();

            Truck myTruck = new Truck("Mercedes", "Actros", "Power White", 2015, 40);
            printVehicleDetails(myTruck);
            Console.ReadLine();
        }
Example #2
0
 public static void printVehicleDetails(Vehicle vehicle)
 {
     Console.WriteLine("Here are the Vehicle´s details: {0} ", vehicle.FormatMe());;
 }