Exemplo n.º 1
0
        private void AddCar()
        {
            string id;
            string brand;

            Console.Write("Enter ID of car:");
            id = Console.ReadLine();
            Console.Write("Enter Brand of car:");
            brand = Console.ReadLine();

            carRental.AddCar(new Car(id, brand));
        }
        static void GenerateTestCarRental()
        {
            CarRentalSystem carRental = new CarRentalSystem();

            Client clien1 = new Client("111", "Mr.Jonson");
            Client clien2 = new Client("222", "Mr.Anderson");
            Client clien3 = new Client("333", "Mr.Pietersen");

            carRental.AddClient(clien1);
            carRental.AddClient(clien2);
            carRental.AddClient(clien3);

            Car car1 = new Car("1111", "Mercedes-Benz");
            Car car2 = new Car("2222", "BMW");
            Car car3 = new Car("3333", "Audi");
            Car car4 = new Car("4444", "Ferrari");

            carRental.AddCar(car1);
            carRental.AddCar(car2);
            carRental.AddCar(car3);
            carRental.AddCar(car4);
        }