Using the provided Rental Car Transaction Java Classes - 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 solely in the RentalCarTransaction main() method. 1. Load the values for this class using the setter methods. LocalDate items do not need to be set - only Strings and missing numeric data. 2. When creating data for the addresses, the DropOffLocation needs to be the same as the PickupLocation. (Hint - Avoid duplicate code) 3. Set the currentMileage for the carToRent instance. Set the startMileage of the RentalTransaction by calling the getCurrentMileage() from the carToRent instance. 4. Set the endMileage of the RentalTransaction to be 200 more miles than the startMileage. 5. There should be no 'null' or -1 values. See the "Things to Know" section for more information about passing Long and Short literal values to methods. The program provided is runnable as-is. Your task is to load the data with reasonable values. The deliverable is the updated RentalCarTransaction.java file only. No other classes are to be changed. Below is an example of what type of output is expected: RentalCarTransaction [ carToRent=Automobile [autoManufacturer=Audi, model=TT, currentMileage=5500, modelYear=2020, seatingCapacity=4, automobileVIN=G434T54354371234T], paymentInfo=FormOfPayment [cardProviderName=VISA, cardUser=Professor Keith, creditCardNumber=1234567812346789, creditCardVerificationCode=123, expirationDate=2025-05-31], PickupLocation=Address [optionalLocationName=Hilton Hotel, street1=100 Main, street2=Building A, city=Dallas, stateCode=TX, zipCode=75555], DropOffLocation=Address [optionalLocationName=Hilton Hotel, street1=100 Main, street2=Building A, city=Dallas, stateCode=TX, zipCode=75555], StartDate=2019-11-26, EndDate=2019-11-26, StartMileage=5500, EndMileage=5700]
Using the provided Rental Car Transaction Java Classes - 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 solely in the RentalCarTransaction main() method.
1. Load the values for this class using the setter methods. LocalDate items do not need to be set - only Strings and missing numeric data.
2. When creating data for the addresses, the DropOffLocation needs to be the same as the PickupLocation. (Hint - Avoid duplicate code)
3. Set the currentMileage for the carToRent instance. Set the startMileage of the RentalTransaction by calling the getCurrentMileage() from the carToRent instance.
4. Set the endMileage of the RentalTransaction to be 200 more miles than the startMileage.
5. There should be no 'null' or -1 values.
See the "Things to Know" section for more information about passing Long and Short literal values to methods.
The program provided is runnable as-is. Your task is to load the data with reasonable values.
The deliverable is the updated RentalCarTransaction.java file only. No other classes are to be changed.
Below is an example of what type of output is expected:
RentalCarTransaction [
carToRent=Automobile [autoManufacturer=Audi, model=TT, currentMileage=5500, modelYear=2020, seatingCapacity=4, automobileVIN=G434T54354371234T],
paymentInfo=FormOfPayment [cardProviderName=VISA, cardUser=Professor Keith, creditCardNumber=1234567812346789, creditCardVerificationCode=123, expirationDate=2025-05-31],
PickupLocation=Address [optionalLocationName=Hilton Hotel, street1=100 Main, street2=Building A, city=Dallas, stateCode=TX, zipCode=75555],
DropOffLocation=Address [optionalLocationName=Hilton Hotel, street1=100 Main, street2=Building A, city=Dallas, stateCode=TX, zipCode=75555],
StartDate=2019-11-26,
EndDate=2019-11-26,
StartMileage=5500,
EndMileage=5700]
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images