static void Main() { ICar seat = new Seat("Leon", "Grey"); ICar tesla = new Tesla("Model 3", "Red", 2); Console.WriteLine(seat.ToString()); Console.WriteLine(tesla.ToString()); }
public static void Main() { string model = Console.ReadLine(); string color = Console.ReadLine(); var seat = new Seat(model, color); model = Console.ReadLine(); color = Console.ReadLine(); int batteries = int.Parse(Console.ReadLine()); var tesla = new Tesla(model, color, batteries); Console.WriteLine(seat.ToString()); Console.WriteLine(tesla.ToString()); }