public bool AddCar() { Console.WriteLine("Введите тип машины: BUS, MINIBUS, TRUCK."); string type = Console.ReadLine(); if (type == "BUS") { Console.WriteLine("Введите расход, пассажироемкость и грузоподъемность."); return(factory.AddBus(Convert.ToDouble(Console.ReadLine()), Convert.ToInt32(Console.ReadLine()), Convert.ToDouble(Console.ReadLine()))); } else if (type == "TRUCK") { Console.WriteLine("Введите расход и грузоподъемность."); return(factory.AddTruck(Convert.ToDouble(Console.ReadLine()), Convert.ToDouble(Console.ReadLine()))); } else if (type == "MINIBUS") { Console.WriteLine("Введите расход и пассажироемкость."); return(factory.AddVan(Convert.ToDouble(Console.ReadLine()), Convert.ToInt32(Console.ReadLine()))); } else { return(false); } }
public bool AddTruck(double GasUse, double Capacity) { return(Enterprice.AddTruck(GasUse, Capacity)); }