Problem Description: Write a C++ program that calculates and displays the total travel expenses of a business trip. The user must provide the following information:
* Number of days spent on the trip. * The departure on the first day of the trip, and the time of arrival back home on the last day of the trip. The departure and arrival time must be entered in 12h or 24h formats. Your program should consider AM and PM. * The amount of meals eaten
The company reimburses travel expenses according to the following policy:
Up to $37.00 per day for meals. The company allows up to $ 9 for breakfast, $ 12 for lunch, and $ 16 for dinner per day. On the first day of the trip, breakfast is allowed as an expense if the time of departure is before 7 AM. Lunch is allowed if the time of departure is before 12 noon. Dinner is allowed on the first day if the time of departure is before 6 PM. On the last day of the trip, breakfast is allowed if the time of arrival is after 8 AM. Lunch is allowed if the time of arrival is after
1 PM. Dinner is allowed on the last day if the time of arrival is after 7 PM.
Anything in excess of this must be paid by the employee. It is not necessary reimburse to the company any savings on meals. It can be subtracted to the amount that must be reimbursing to the company. The following Table summarized this point.
The program should calculate and display the following: * Total expenses incurred by the business person * The total allowable expenses for the trip * The excess for that must be paid by the business person, if any * The amount saved by the business person if the expenses were under the total allowed.
These are the specifications and I have it done, because I understand that I have to begin with days and the input validation of this, but I want to optimize the code that I have to calculate the others things.
I have to do the program with these functions