Dallas County Community Rental Car Transaction Java Programming Project
15:Rental Car Data Load
Using the provided Rental Car Class – Load the data to produce the results similar as given below.
To do this, you will need to do the following. This should all be done the RentalCarTransaction() constructor.
1. Load the values for this class using the setter methods. LocalDate items do not need to be set – only Strings and numeric data.
2. You will need to create the toString method for the Address class. Otherwise you may only see
getPickupLocation()=RentalCarTransaction$Address@57baeedf
See Eclipse – Generating toString from Week 13 Things to Know if needed:
When creating data for the addresses, the DropOffLocation needs to be the same as the PickupLocation.
(Hint – try to avoid duplicate code)
3. Load the startMileage for the RentalTransaction instance by calling the getCurrentMileage() from the carToRent instance. Note the same values for getCurrentMileage on the first line and getStartMileage on the last line.
4. Display the toString result of the is class (RentalTransaction) There should be no ‘null’ or -1 values.
The program is runnable as-is. Your task is to load the data with reasonable values.
RentalCarTransaction [getCarToRent()=Automobile [getAutoManufacturer()=Chevy, getModel()=Monte Carlo, getCurrentMileage()=2250, getModelYear()=2019, getSeatingCapacity()=4, getVIN()=G4343243243432]
, getPaymentInfo()=FormOfPayment [getCardProviderName()=VISA, getCardUser()=Professor Keith, getCreditCardNumber()=4234123412341234, getCVC()=888, getExpirationDate()=2020-05-31]
, getPickupLocation()=Address [getLocationName()=Airport, getStreet1()=100 Airport Lane, getStreet2()=Building G, getCity()=Dallas, getStateCode()=TX, getZipCode()=75555]
, getDropOffLocation()=Address [getLocationName()=Airport, getStreet1()=100 Airport Lane, getStreet2()=Building G, getCity()=Dallas, getStateCode()=TX, getZipCode()=75555]
, getStartDate()=2019-04-30, getEndDate()=2019-04-30, getStartMileage()=2250, getEndMileage()=2800]