Question: Use cases for our parking management system The system has several parking lots and the parking fees are different for each parking lot. Some parking
Use cases for our parking management system
- The system has several parking lots and the parking fees are different for each parking lot.
- Some parking lots scan permits only on entry. A charge is on entry, plus daily charges if the car is parked overnight.
- Some parking lots scan permits on entry and exit, and the charge is based on total hours parked, upon exit.
- Customers must have registered with our parking office in order to use any parking lot. Customers can use any parking lot. Each parking transaction will incur a charge to their account.
- Customers can have more than one car, and so they may request more than one parking permit for each car.
- The system provides a 20% discount to compact cars compare to SUV cars.
- For simplicity, assume that the Parking Office sends a monthly bill to the customer and the customer pays it outside of the parking system.
Question - Converting UML to code
Keywords UserInterface, service, Commands, Java, commands, UML
In order to provide a UI for our simple existing java parking management system (use cases included above), we need a parking service on top of our parking office class.
There is a need to create the following commands
- CUSTOMER register a car with the parking office and provide a permit for the car
- CAR register a car with the parking office and provide a permit for the car
A sequence diagram for the customer command is given below, the sequence diagram for the car command should be similar to that of the customer command
Based on the diagram below you should create the following classes and interfaces. You should also implement the behavior described in the sequence diagram for both car and customer commands:
- Customer
- Car
- ParkingOffice
- ParkingService
- Command
- RegisterCarCommand
- RegisterCustomerCommand
Include a small explanation about how you propose to solve the problem and write your java code
Image 1- A class diagram for our simple existing parking application
Image 2 A class diagram for our parking service and A sequence diagram for our customer command
Try to separate your answers into parts and provide an explanation
*** The second image contains two pictures side by side, the one on the left is parking service the one on the right is the customer command ***
Thank You !!!!!!

\

C Parking Lot o id: String O name : String O address : Address getDailyRate(CarType) : Money C Parking Office o parking OfficeName : String O listOfCustomers : List o parking OfficeAddress : Address getParking OfficeName(): String o register(Customer) : void register(Car): Parking Permit . park(Date, Parking Permit , Parking Lot) : Parking Transaction .getParkingCharges(Parking Permit) : Money getParkingCharges(Customer) : Money C Money O amount : long O currency: String C PermitManager permits : List register(Car): Parking Permit Transaction Manager o transactions : List park(Date, Parking Permit, Parking Lot): Parking Transaction getParking Charges(Parking Permit) : Money getParkingCharges(Customer): Money Customer o id : String O firstName : String o lastName : String o phoneNumber : String o address : Address .getCustomerName(): String C Car o type: CarType O license Plate : String owner : Customer getType(): CarType .getLicense Plate(): String .getOwner(): Customer C ParkingPermit o id: String O car: Car O expiration : Date getCar(): Car C ParkingTransaction o date : Date permit: Parking Permit o parking Lot: Parking Lot o chargedAmount: Money getChargedAmounto : Money .getPermit(): Parking Permit E CarType C Address O streetAddress1: String O streetAddress2 : String o city: String Ostate : String O zip : String .getAddressInfo() : String COMPACT SUV Parking Office service:Parking Service Customer office:Parking Office Parking Service office: Parking Office commands: Map +register(Customer): String - customer id +register(Car): String - parking permit id performCommand("CUSTOMER, args) - register(command): void +performCommand(String, String[] parameters): String checkParameters(args) create(parameters) *customer RegisterCarCommand Register Customer Command register(customer) office: Parking Office - checkParameters(Properties): void +execute(Properties): String office: Parking Office -checkParameters(Properties): void +execute(Properties): String List of changes: 1) Command parameters in an array, not List Command getCommandName(): String getDisplayName(): String execute(Properties params): String C Parking Lot o id: String O name : String O address : Address getDailyRate(CarType) : Money C Parking Office o parking OfficeName : String O listOfCustomers : List o parking OfficeAddress : Address getParking OfficeName(): String o register(Customer) : void register(Car): Parking Permit . park(Date, Parking Permit , Parking Lot) : Parking Transaction .getParkingCharges(Parking Permit) : Money getParkingCharges(Customer) : Money C Money O amount : long O currency: String C PermitManager permits : List register(Car): Parking Permit Transaction Manager o transactions : List park(Date, Parking Permit, Parking Lot): Parking Transaction getParking Charges(Parking Permit) : Money getParkingCharges(Customer): Money Customer o id : String O firstName : String o lastName : String o phoneNumber : String o address : Address .getCustomerName(): String C Car o type: CarType O license Plate : String owner : Customer getType(): CarType .getLicense Plate(): String .getOwner(): Customer C ParkingPermit o id: String O car: Car O expiration : Date getCar(): Car C ParkingTransaction o date : Date permit: Parking Permit o parking Lot: Parking Lot o chargedAmount: Money getChargedAmounto : Money .getPermit(): Parking Permit E CarType C Address O streetAddress1: String O streetAddress2 : String o city: String Ostate : String O zip : String .getAddressInfo() : String COMPACT SUV Parking Office service:Parking Service Customer office:Parking Office Parking Service office: Parking Office commands: Map +register(Customer): String - customer id +register(Car): String - parking permit id performCommand("CUSTOMER, args) - register(command): void +performCommand(String, String[] parameters): String checkParameters(args) create(parameters) *customer RegisterCarCommand Register Customer Command register(customer) office: Parking Office - checkParameters(Properties): void +execute(Properties): String office: Parking Office -checkParameters(Properties): void +execute(Properties): String List of changes: 1) Command parameters in an array, not List Command getCommandName(): String getDisplayName(): String execute(Properties params): String