Only meant to do Stage 2, in the rubric it states what is meant to be completed for stage 2. Stage 1 is already completed.
COSC 237 1 COSC 237 Dierbach Spring 2022 PROGRAM 4 – Corporate Vehicle Rental Agency 250 pts. (Due dates below) Problem Description You are to develop a Java program, using an object-oriented design, capable of maintaining vehicle rental reservations for a vehicle rental agency that rents cars, SUVs and trucks to corporate customers. Problem Scenario The agency offers various model cars, SUVs and trucks for rent to corporate customers (not private individuals). Vehicles may be rented for a period of days, weeks, or months. Monthly rentals are cheaper (on a daily basis) than weekly rentals, and weekly rentals are cheaper than daily rentals. There is also a mileage charge and optional daily insurance. Rates differ for cars, SUVs and trucks. (There is no difference in the rates among various model vehicles however.) Each corporate customer may choose to be a “Prime Corporate Customer” for a yearly fee. Prime customers receive 100 free miles for each individual rental. Users of the System There are two types of users of the system, Employees and Managers, described below. Employees of the rental agency may do the following (referred to as use cases in software development): (1) view current rates (for a given vehicle type, including insurance rates and per mile charge), (2) view available (unreserved) vehicles (cars, SUVs or trucks), (3) display estimated cost (for a given vehicle type, expected rental period, expected number of miles to be driven, insurance option, and if a prime customer), (4) reserve a vehicle (by credit card number) for a specific vehicle, rental period, and daily insurance option (accept or decline), (5) cancel a reservation (by provided credit card number), (6) view a specific corporate account (by credit card number) and (7) process a returned vehicle (by provided VIN) which: (a) calculates charge based on rates at the time reserved, number of days had the vehicle, the number of miles driven, whether daily insurance was selected, and whether a Prime customer (Prime customers get 100 free miles) (b) removes the reservation for the returned vehicle (c) creates/stores a transaction entry. Managers of the vehicle rental agency may: (1) view/update current rates (including per mile charge and daily insurance rates), (2) view all vehicles (each indicated as reserved or unreserved), (3) add corporate accounts, (4) view a list of all current reservations, (5) view a list of all accounts, and (6) view a list of all transactions (i.e., history of returned and paid rentals). A use case diagram for the system is given on the following page. Jonathan Amanuel Jonathan Amanuel 2 Use Case Diagram View/update Rates Add/update Account 3 Vehicle Information Vehicles are identified by a unique VIN (Vehicle Identification Number). The set of features maintained for cars, SUVs and trucks are different. Cars are specified as a specific make and model, a miles per gallon rating, and seating capacity. SUVs are specified as a particular make and model, a miles per gallon rating, seating capacity, and cargo capacity. Trucks are specified as a particular length (in feet), miles per gallon rating, and load capacity. Following is the list of vehicles, including the given VINs that you must use for this assignment. ALL OF THE FOLLOWING VEHICLES WITH THE CORRECT ASSOCIATED VIN MUST BE USED TO RECEIVE CREDIT FOR THE ASSIGNMENT. NOTE: The output is NOT meant to be displayed as below. It is only presented this way for informational purposes. (The list of vehicles should be displayed as shown in program requirement 1 below.) Make/Model Mileage Seating VIN Capacity CARS Chevrolet Camaro - 2018 30 mpg 2 KH4GM4564GQ Ford Fusion - 2018 34 mpg 4 AB4FG5689GM Ford Fusion Hybrid 32 mpg 4 KV4EG3245RV Chevrolet Impala - 2019 30 mpg 4 RK3MB3366YH Make/Model Mileage Seating Cargo VIN Capacity Capacity SUVs Honda Odyssey 28 mpg 7 6 cubic ft. VM9RF2635TD Dodge Caravan 25 mpg 5 4 cubic ft. QK3FT4273NE Ford Expedition 20 mpg 5 3 cubic ft. JK2HL8264HY Make/Model Mileage Load VIN Capacity Trucks Ten-Foot 12 mpg 2810 lbs. EJ5KU2437BD Eighteen-Foot 10 mpg 5950 lbs. KG4MD5372RK Twenty-Four-Foot 8 mpg 6500 lbs. EB2WR3082OB Twenty-Four-Foot 8 mpg 6510 lbs. TV3GH4390FK 4 Program Requirements The following summarizes the requirements for this program: 1. The program must be able to maintain a collection of specific model vehicles of type Car, SUV, and Truck, and be able to display the vehicles in the following format: Ford Fusion (Car) MPG: 34 Seating: 4 VIN: AB4EG5689GM Honda Odyssey (SUV) MPG: 28 Seating: 7 Storage: 6 cu. ft. VIN: QK3FT4273NE Chevrolet Impala (Car) MPG: 30 Seating: 4 VIN: RK3MB3366YH Eighteen-Foot (Truck) MPG: 12 Load Capacity: 5390 lbs. VIN: KG4MD5372RK 2. The program must be able to maintain a set of current rates for Cars, SUVs and Trucks, and display the rates in the following format, that can be updated when needed: Car Rates Daily: $24.95 Weekly: $169.95 Monthly: $514.95 Per Mile: $0.16 Daily Insur: $14.95 3. The program must be able to provide an estimated cost of rental based on the vehicle type, expected rental period, expected number of miles to be driven, insurance option, and whether a Prime Customer. 4. The program must allow vehicles to be reserved by a specific account customer, for a specific VIN, time period, and daily insurance option. 5. The program must allow reservations to be cancelled (by a provided credit card number). 6. The program must process a returned vehicle to (a) display the amount due for the actual number of days had and mileage driven (with 100 free miles for Prime Customers), (b) move the reservation information to the transaction “file” (Transactions object), and (c) remove the reservation for the given vehicle. To calculate the cost, the weekly or monthly rate will be applied, when applicable, with any left-over days pro-rated at the weekly or daily rate (e.g., 40 days would be 31 days at the monthly rate, and the remaining 9 days each at a rate of (monthly rate / 31). 7. The program must be able to display all reservations. 8. The program must allow corporate customer accounts to be created, storing the company name, whether they are a prime customer, and credit card number. 9. The program must be able to display specific accounts (by credit card number) and also a list of all corporate accounts. 10. The program must maintain a history of all completed transactions (i.e., when a vehicle is returned and paid for). The information stored should include the name of the company, the company’s credit card number, the type and model of vehicle rented, the number of days had, the number of miles driven, and the total cost displayed as follows: ABC Company (card #3212546453245879), Car: Ford Fusion, 3 days, 540 mi., $120.54 5 Rates Following are the rental rates, per mile charges, and insurance rates that you must use for each vehicle type: Current Rental Rates Daily Weekly Monthly Rate Rate Rate Car $24.95 $169.95 $514.95 SUV $29.95 $189.95 $679.95 Truck $36.95 $224.95 $687.95 Mileage Charge: 0.16 / mile for cars and SUVs 0.26 / mile for trucks Insurance Rates: $14.95 / day for cars and SUVs $21.95 / day for moving trucks How Rental the Rates are Handled The rental rates for all three vehicle types (Car, SUV and Truck) have the same information, as shown above,