Example #1
0
        private void CreateVehicleInstance(Enums.VehicleType vehicleType, VehiclesData vehicleDataInput)
        {
            switch (vehicleType)
            {
            case Enums.VehicleType.Car:
                this.vehicle = new Car(vehicleDataInput);
                break;

            case Enums.VehicleType.Trunk:
                this.vehicle = new Trunk(vehicleDataInput);
                break;

            case Enums.VehicleType.Motorcycle:
                this.vehicle = new Motorcycle(vehicleDataInput);
                break;

            default:
                throw new Exception(string.Format("Unexpected vehicle type: {0}", vehicleType.ToString()));
            }
        }
Example #2
0
 public Vehicle(VehiclesData vehicleDataInput)
 {
     this.vehiclesData = vehicleDataInput;
 }
Example #3
0
 public Motorcycle(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
     this.WashService = new HandWashFacilities();
 }
Example #4
0
 public Auto(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
 }
Example #5
0
 public Service(Enums.VehicleType vehicleType, VehiclesData vehicleDataInput, IEnumerable <Enums.ServiceActions> actions)
 {
     this.servicesList = actions;
     this.CreateVehicleInstance(vehicleType, vehicleDataInput);
 }
Example #6
0
 public Car(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
     this.WashService = new SelfServiceFacilities();
 }
Example #7
0
 public Trunk(VehiclesData vehicleDataInput)
     : base(vehicleDataInput)
 {
     this.WashService = new InBayAutomatics();
 }