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()); }
public 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()); }
static void Main(string[] args) { ICar seat = new Seat("Ibiza", "Grey"); ICar tesla = new Tesla("Model 3", "Black", 99); Console.WriteLine(seat.ToString()); Console.WriteLine(tesla.ToString()); }
static void Main() { ICar seat = new Seat("Leon", "Grey"); ICar tesla = new Tesla("Model S", "White", 4); Console.WriteLine(seat.ToString()); Console.WriteLine(tesla.ToString()); }
static void Main(string[] args) { var seat = new Seat("Leon", "Grey"); var tesla = new Tesla("Model 3", "Red", 2); Console.WriteLine(seat); Console.WriteLine(tesla.ToString()); }
static void Main(string[] args) { ICar seat = new Seat("Ibisa", "red"); ICar tesla = new Tesla("Model S", "white", 2); Console.WriteLine(seat.ToString()); Console.WriteLine(tesla.ToString()); Console.WriteLine(tesla.); }
static void Main(string[] args) { ICar seat = new Seat("Leon", "Grey"); ICar tesla = new Tesla("Model 3", "Red", 2); Console.WriteLine(seat.ToString()); seat.Start(); seat.Stop(); Console.WriteLine(tesla.ToString()); tesla.Start(); tesla.Stop(); }
public static void Main(string[] args) { try { ICar seat = new Seat("Leon", "Grey"); ICar tesla = new Tesla("Model 3", "Red", 2); Console.WriteLine(seat.ToString()); Console.WriteLine(tesla.ToString()); } catch (ArgumentException exception) { Console.WriteLine(exception.Message); } }