static void Main(string[] args) { Car Lambo = new Car("Lamborghini", "Morcielagro", "df23faeg", Color.NavyBlue, 0); Lambo.Accelerate(100); Lambo.Accelerate(50); Lambo.Stop(); Console.WriteLine("So all in all we have a " + Lambo.CarColor + " " + Lambo.Brand + " " + Lambo.Model + " with engine No: " + Lambo.CarEngine.EngineNumber); Console.ReadKey(); }
static void Main(string[] args) { Car Panarama = new Car("Mercedes-benz", "E-270", 7, 50, 70); Car Sorento = new Car("Kia", "Sorento", 7, 70, 90); Car Santafe = new Car("Hundai", "Santafe", 8, 65, 80); do { Console.WriteLine("1.Go"); Console.WriteLine("2.Top up"); Console.WriteLine("3.Local km"); Console.WriteLine("4.Global km"); Console.WriteLine("5.Exit"); Console.Write(">>>>>>>>"); userInput = Console.ReadLine(); if (CheckInput(userInput)) { switch (userInput) { case "1": Panarama.Go(); break; case "2": Panarama.TopUp(); break; case "3": Panarama.Stop(); break; case "4": break; default: Console.WriteLine("Xahis edirik yuxaridaki reqemlerden birini daxil edin"); break; } } else { Console.WriteLine("Xahis edirik regem daxil edin"); }; }while (userInput != "5"); }