Exemplo n.º 1
0
        public static void Main()
        {
            string driverName = Console.ReadLine();

            ICar car = new Ferrari(driverName);

            Console.WriteLine($"{car.Model}/{car.UseBrakes()}/{car.PushGasPedal()}/{car.Driver}");
        }
        public static void Main()
        {
            string name = Console.ReadLine();

            Ferrari ferrari = new Ferrari(name, "488-Spider");

            Console.WriteLine($"" +
                              $"{ferrari.Model}" +
                              $"/{ferrari.UseBrakes()}" +
                              $"/{ferrari.PushTheGasPedal()}" +
                              $"/{ferrari.Name}");
        }