Ejemplo n.º 1
0
        public static void Main()
        {
            Garage garage = new Garage();
            int    lines  = int.Parse(Console.ReadLine());

            for (int i = 0; i < lines; i++)
            {
                Car car = CreateCar();

                garage.Add(car);
            }

            string command = Console.ReadLine();

            if (command == "fragile")
            {
                Console.WriteLine(garage.Fragile());
            }
            else
            {
                Console.WriteLine(garage.Flamable());
            }
        }
Ejemplo n.º 2
0
 public static void AddNewCarInGarage(string model, Engine engine, Cargo cargo, Tires tires)
 {
     Garage.AddCarInGarage(new Car(model, engine, cargo, tires));
 }