public void HireDriver() { Driver Driver = new Driver(); CatchDriverData(Driver); StandardMessage.ValidationSummary(Company.AddNewDriver(Driver)); }
public void AddVehicle() { Vehicle Vehicle = new Vehicle(); CatchVehicleData(Vehicle); StandardMessage.ValidationSummary(Company.AddNewVehicle(Vehicle)); }
public void AssignDriverToVehicle() { int driverId, vehicleId; driverId = InputDriver.CatchDriverId(); vehicleId = InputVehicle.CatchVehicleId(); StandardMessage.ValidationSummary(Company.AssignDriverToVehicle(driverId, vehicleId)); }
public void EditDriverInformations() { if (Company.NumberOfHiredDrivers() > 0) { HiredDrivers(); Driver Driver = new Driver(); Driver.Id = Input.CatchInt("Enter driver's Id: "); if (Company.DoesDriverExist(Driver.Id)) { CatchDriverData(Driver); StandardMessage.ValidationSummary(Company.UpdateDriverInfo(Driver)); } else { StandardMessage.NoDriverFound(); } } else { StandardMessage.NoDriversHired(); } }
public void EditVehicleInformations() { if (Company.NumberOfOwnedVehicles() > 0) { OwnedVehicles(); Vehicle Vehicle = new Vehicle(); Vehicle.Id = InputVehicle.CatchVehicleId(); if (Company.DoesVehicleExist(Vehicle.Id)) { CatchVehicleData(Vehicle); StandardMessage.ValidationSummary(Company.UpdateVehicleInfo(Vehicle)); } else { StandardMessage.NoVehicleFound(); } } else { StandardMessage.NoVehiclesOwned(); } }
public void NotifyVehicleArrive() { int vehicleId = InputVehicle.CatchVehicleId(); StandardMessage.ValidationSummary(Company.VehicleArrive(vehicleId)); }