static void Main(string[] args) { var electricCar = new ElectricCar() { Brand = "i3", Model = "BMW", Doors = 5, TopSpeed = 150, CarConsumption = Consumption.Medium }; electricCar.InfoAboutTheCar(); electricCar.Drive(400); electricCar.Recharge(350); Console.WriteLine("---------------------------------------"); var fuelCar = new FuelCar() { Brand = "A4", Model = "Audi", Doors = 5, TopSpeed = 200, CarConsumption = Consumption.High }; fuelCar.InfoAboutTheCar(); fuelCar.Drive(150); fuelCar.Refuel(47); }
static void Main(string[] args) { var electricCar = new ElectricCar() { Brand = "bmw", Model = 2001, Door = 5, TopSpeed = 150, Consumption = Consumption.Medium }; electricCar.PrintInfo(); electricCar.Drive(200); electricCar.Recharge(300); var fuelCar = new FuelCar() { Brand = "Open", Model = 2005, Door = 4, TopSpeed = 200, Consumption = Consumption.High }; fuelCar.PrintInfo(); fuelCar.Drive(300); fuelCar.Refuel(40); }
static void Main(string[] args) { var newCar = new Car() { CarBrand = "Audi", CarModel = "A6", NumberOfDoors = 4, TopSpeed = 260, Consumption = Consumption.Economic, EngineType = EngineType.Diesel, CarId = CarIDGenerator.GenerateID() }; newCar.PrintInfo(); newCar.Drive(10); var newFuelCar = new FuelCar() { CarBrand = "Toyota", CarModel = "Corrola", NumberOfDoors = 5, TopSpeed = 260, Consumption = Consumption.Medium, EngineType = EngineType.Diesel, CarId = CarIDGenerator.GenerateID() }; newFuelCar.PrintInfo(); newFuelCar.Drive(1000); newFuelCar.Refuel(100); }
static void Main(string[] args) { Console.WriteLine("Electric Car"); var tesla = new ElectricCar("Tesla", "Newest", 5, 220, Enums.Consumption.economic, Enums.EngineType.electric, 100, 80); tesla.PrintInfo(); tesla.Drive(150); tesla.Recharge(300); Console.WriteLine(); Console.WriteLine("Fuel Car"); var astonMartin = new FuelCar() { Brand = "Aston Martin", Model = "DBS Superleggera", Doors = 3, TopSpeed = 280, levelOfConsumption = Enums.Consumption.high, TypeOfEngine = Enums.EngineType.petrol, FuelCapacity = 80, CurrentFuel = 60, }; astonMartin.PrintInfo(); astonMartin.Drive(1500); astonMartin.Refuel(40); Console.ReadLine(); }
static void Main(string[] args) { ElectricCar tesla = new ElectricCar("Tesla", "Model S", 4, 262, Consumption.Economic, 2000); ElectricCar bmw = new ElectricCar("BMW", "I3", 4, 242, Consumption.Economic, 1000); ElectricCar chevrolet = new ElectricCar("Chevrolet", "I3", 4, 242, Consumption.Economic, 1458); tesla.Drive(120); bmw.Drive(250000); chevrolet.Drive(250); tesla.Recharge(20); bmw.Recharge(100); chevrolet.Recharge(5); FuelCar opel = new FuelCar("Opel", "Astra", 4, 220, Consumption.Medium, 1800, 1000); FuelCar renault = new FuelCar("Renault", "Clio", 2, 180, Consumption.High, 1500, 1000); opel.EngineType = EngineType.Disel; opel.Drive(200000); opel.Refuel(1800); renault.Drive(2500); renault.Refuel(500); }
static void Main(string[] args) { ElectricCar Car1 = new ElectricCar(10, "prv", "prv", 3, 200, Consumption.medium, 100, 50); FuelCar Car2 = new FuelCar(50, "vtor", "vtor", 5, 220, Consumption.high, EngineType.diesel, 200, 160); Car1.PrintInfo(); Car2.PrintInfo(); Car1.Drive(100); Car1.Drive(400); Car1.Recharge(60); Car1.Recharge(50); Car2.Drive(200); Car2.Drive(600); Car2.Refuel(130); Car2.Refuel(130); Car1.PrintInfo(); Car2.PrintInfo(); }
static void Main(string[] args) { ElectricCar elCar = new ElectricCar("Tesla", "Model S", 5, 240, Consumption.Economic, 100, 40); FuelCar fuelCar = new FuelCar("Renault", "Megane", 5, 200, Consumption.Medium, EngineType.Diesel, 50, 5); elCar.Recharge(5000); fuelCar.Drive(50); fuelCar.Refuel(200); Console.ReadLine(); }
static void Main(string[] args) { ElectricCar nissan = new ElectricCar("Nissan", "Leaf", 5, 220, Consumption.Econimic, EngineType.Electric, 100, 59); nissan.PrintInfo(); nissan.Drive(572); nissan.Recharge(2059); Console.ReadLine(); FuelCar honda = new FuelCar("Honda", "Civic - Type R", 4, 230, Consumption.Medium, EngineType.Petrol, 60, 49); honda.PrintInfo(); honda.Drive(195); honda.Refuel(9); Console.ReadLine(); }
static void Main(string[] args) { int id = 0; ElectricCar electricCar = new ElectricCar(id, "mazda", "navajo", 5, 150, Consumption.High, 100, 30); Console.WriteLine(electricCar.PrintInfo()); electricCar.Drive(1200); electricCar.Recharge(85); Console.WriteLine("-----------------------------------------------"); FuelCar fuelCar = new FuelCar(id, "porsche", "panamera", 2, 220, Consumption.Economic, EngineType.Diesel, 100, 30); Console.WriteLine(fuelCar.PrintInfo()); fuelCar.Drive(1680); fuelCar.Refuel(62); }
static void Main(string[] args) { var electricCar1 = new ElectricCar() { BateryCapacity = 100, Consume = Consumption.economic, BatteryLeft = 100, ID = CarIdGenerator.GenerateCarId(), Brand = "Toyota", Model = "Prius", Doors = 5, TopSpeed = 180 }; electricCar1.PrintInfo(); electricCar1.Drive(900); electricCar1.Recharge(900); var fuelCar1 = new FuelCar() { FuelCapacity = 60, Consume = Consumption.medium, CurrentFuel = 60, Brand = "KIA", Model = "Ceed", Doors = 5, ID = CarIdGenerator.GenerateCarId(), TopSpeed = 190, }; fuelCar1.PrintInfo(); fuelCar1.Drive(310); fuelCar1.Refuel(10); Console.ReadLine(); }
static void Main(string[] args) { Car Volvo = new Car(); Volvo.Id = Volvo.GenerateID(); Volvo.Brand = "Volvo"; Volvo.Model = "XC40"; Volvo.Doors = 5; Volvo.TopSpeed = 270; Volvo.CarConsumption = Consumption.Economic; Volvo.CarEngine = EngineType.Electric; Volvo.PrintInfo(); ElectricCar Audi = new ElectricCar(); Audi.CarConsumption = Consumption.Medium; Console.WriteLine(Audi.BatteryCapacity); Audi.Drive(400); Console.WriteLine(Audi.BatteryCapacity); Audi.Recharge(750); FuelCar Ferrari = new FuelCar(); Ferrari.CarConsumption = Consumption.High; Ferrari.CarEngine = EngineType.Petrol; Console.WriteLine(Ferrari.CurrentFuel); Ferrari.Drive(100); Console.WriteLine(Ferrari.CurrentFuel); Ferrari.Refuel(55); Console.WriteLine("SUP?"); Console.ReadLine(); }
static void Main(string[] args) { var idNumber = RandomNumber.GenerateRandomNum(); var toyota = new FuelCar() { Brand = "Toyota", Model = "C-HR", Doors = 2, TopSpeed = 190, Id = idNumber, FuelCapacity = 50, CurrentFuel = 30 }; toyota.TypeOfEngine = EngineType.Disel; toyota.Consumpt = Consumption.Medium; toyota.PrintInfo(); toyota.Drive(30); toyota.Refuel(45); var nissan1 = new ElectricCar() { Brand = "Nissan", Model = "Leaf", Doors = 5, TopSpeed = 144, Id = idNumber + 1, BatteryCapacity = 243, BatteryUsage = 40 }; nissan1.TypeOfEngine = EngineType.Electric; nissan1.Consumpt = Consumption.Economic; nissan1.PrintInfo(); nissan1.Drive(40); nissan1.Recharge(10); var audi = new FuelCar() { Brand = "Audi", Model = "A 7", Doors = 4, TopSpeed = 250, Id = idNumber + 2, FuelCapacity = 65, CurrentFuel = 50 }; audi.TypeOfEngine = EngineType.Petrol; audi.Consumpt = Consumption.Hight; audi.PrintInfo(); audi.Drive(180); audi.Refuel(20); Console.ReadLine(); }