java programming 71

15:Rental Car Data Load

RentalCarTransaction.java

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]

 
Looking for solution of this Assignment?

WHY CHOOSE US?

We deliver quality original papers

Our experts write quality original papers using academic databases.  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay