Exemplo n.º 1
0
        static void Main(string[] args)
        {
            BigVehicle ford = new BigVehicle();

            ford.wheelSize     = 16;
            ford.nOfDoors      = 4;
            ford.milespergal   = 30;
            ford.colorOfBody   = "Red";
            ford.sizeOfVehicle = "Mid-Size";
            ford.PrintBase();
            ford.Honk();

            Console.ReadKey();
        }
Exemplo n.º 2
0
    static void Main()
    {
        Bus        bus2;
        BigVehicle big2;

        big2.InService   = true;
        big2.NumberPlate = "Eazy Rider";
        big2.Seats       = 20;
        bus2             = (Bus)big2;

        Bus        bus1 = new Bus("Eazy Rider", 20, true);
        BigVehicle big1 = bus1;


        Console.WriteLine("The Bus bus2 has {0} new seats", big2.Seats);
        Console.WriteLine(big2.NumberPlate);
        Console.WriteLine("Bus Inservice is {0}", big2.InService);
    }