![Java Assignment Help : Travel Expenses calculator](https://static.wixstatic.com/media/a27d24_c5a4a5a4782249a89bf57466e22a887d~mv2.png/v1/fill/w_49,h_28,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_c5a4a5a4782249a89bf57466e22a887d~mv2.png)
Some help.
Let
days – number of days on the trip,
air – amount of airfare, if any,
carRentalActual – amount of car rental fees, if any,
miles – number of miles driven, if a private vehicle was used,
parkingActual – amount of parking fees, if any,
taxiActual - amount of taxi charges, if any,
reg – conference or seminar registration fee, if any,
lodgingPerNightActual – lodging charges per night,
DAILY_MEAL_RATE = 37.0,
MAX_PARKING_FEES = 10.0,
MAX_TAXI = 20.0,
MAX_LODGING_PER_NIGHT = 95.0,
MILEAGE_RATE = 0.27.
Then reimbursement may be calculated as
reimbursable = (days * DAILY_MEAL_RATE) + parkingRe + taxiRe +
(miles * MILEAGE_RATE) + lodgingRe +
carRentalActual + air + reg,
where parkingRe is the minimum of parkingActual and (MAX_PARKING_FEES
* days),
taxiRe is the minimum of taxiActual and (MAX_TAXI * days),
lodgingRe is the minimum of (lodgingPerNightActual * days) and
(MAX_LODGING_PER_NIGHT * days).
Allowable expenses should be calculated as the maximum expenses
that company will reimburse. Of course company will not permit
mutually exclusive events. For example you cannot rent a car and take
a taxi simultaneously.