Esempio n. 1
0
        static void Main(string[] args)
        {
            // Create an instance of each vehicle.
            Zero zero = new Zero();

            zero.MainColor        = "red";
            zero.MaximumOccupancy = "2";

            Cessna cessna = new Cessna();

            cessna.MainColor        = "blue";
            cessna.MaximumOccupancy = "3";

            Tesla tesla = new Tesla();

            tesla.MainColor        = "red";
            tesla.MaximumOccupancy = "4";

            Ram ram = new Ram();

            ram.MainColor        = "black";
            ram.MaximumOccupancy = "6";

            zero.Drive();
            ram.Drive();
            tesla.Drive();
            cessna.Drive();

            zero.Turn();
            zero.Stop();
            ram.Turn();
            ram.Stop();
            tesla.Turn();
            tesla.Stop();
            cessna.Turn();
            cessna.Stop();
        }