Beispiel #1
0
        static void Main(string[] args)
        {
            Voertuig v     = new Voertuig(ConsoleColor.Magenta);
            Voertuig truck = new Vrachtwagen();
            Voertuig car   = new Auto();

            Persoon p = new Persoon();

            Console.WriteLine("Wat is uw naam?");
            p.Naam = Console.ReadLine();

            v.Bestuurder = p;

            v.Rij();
            truck.Rij();
            car.Rij();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Voertuig v     = new Voertuig(ConsoleColor.Magenta);
            Voertuig truck = new Vrachtwagen();
            Voertuig citta = new Brommer();
            Persoon  rik   = new Persoon();
            Dief     billy = new Dief();

            billy.Naam      = "Bill";
            billy.Rijbewijs = false;

            v.Rij();
            truck.Rij();
            citta.Rij();
            citta.Stuur(28);
            billy.Steelt(citta);
        }