static void Main(string[] args)
        {
            ICar seat  = new Seat("Leon", "Grey");
            ICar tesla = new Tesla("Model 3", "Red", 2);

            Console.WriteLine(seat.Start());
            Console.WriteLine(seat.Stop());
            Console.WriteLine(tesla.Start());
            Console.WriteLine(tesla.Stop());
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            ICar seat  = new Seat("Comfy 3000", "Space Black");
            ICar tesla = new Tesla(50000, "3", "Red");

            Console.WriteLine(seat.Start());
            Console.WriteLine(seat.Stop());
            Console.WriteLine(seat);
            Console.WriteLine(tesla.Start());
            Console.WriteLine(tesla.Stop());
            Console.WriteLine(tesla);
        }
        public static void Main(string[] args)
        {
            Seat  seat  = new Seat("Grey", "Leon");
            Tesla tesla = new Tesla("Red", "Model 3", 2);

            Console.WriteLine(seat);
            Console.WriteLine(seat.Start());
            Console.WriteLine(seat.Stop());

            Console.WriteLine(tesla);
            Console.WriteLine(tesla.Start());
            Console.WriteLine(tesla.Stop());
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Seat seat = new Seat();

            System.Console.WriteLine(seat.Start());//From base class
            System.Console.WriteLine(seat.Stop());

            ICar tesla = new Tesla("3", "Black");

            System.Console.WriteLine(tesla.Start());
            System.Console.WriteLine(tesla.ToString());
            System.Console.WriteLine(tesla.Stop());
            System.Console.WriteLine(tesla.ToString());
        }