Beispiel #1
0
        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");
        }