Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello I need help setting up the functions that are bolded . 20. Using Files-Tra

ID: 3601219 • Letter: H

Question

Hello I need help setting up the functions that are bolded.  

20. Using Files-Travel Expenses
One student should design function main , which will call the other functions in
the program . The rest of the functions should be designed by other team members.
• Analyze the program requirement s so each student is given about the same
workload .
• Decide on the function names, parameters , and return types in advance.
• Use stubs and drivers to test and debug the program.
• The program can be implemented either as a multifile program , or all the functions
can be cut and pasted into the main file.

Here is the assignment . Write a program that calculates and displays the tota l travel
expenses of a businessperson on a trip . The program should have functions that ask for
and return the following:
• The total number of days spent on the trip
• The time of departure on the first day of the trip and the time of arriva l back
home on the last day of the trip
• The amount of any round -trip airfare
• The amount of any car rentals
• Miles driven, if a private vehicle was used. Vehicle allowance is $0.58 per mile.
• Parking fees. (The company allows up to $12 per day. Anything in excess of this
must be paid by the employee.)

• Taxi fees. (The company allows up to $40 per day for each day a taxi was used.
Anything in excess of this must be paid by the employee.)
• Conference or seminar registration fees
• Hotel expenses. (The company allows up to $90 per night for lodging. Anything
in excess of this amount must be paid by the employee. )

THANKS!

Explanation / Answer

the required code is as follow :

-------------------------------------------------------------------------------------------------------


double taxiFee(){
double fee;
std :: cout << " Enter taxi fee :" /* ask for taxi fee */
std :: cin >> fee;         /* read taxi fee */
double exemption = 40 * numOfDays(); /* calculate exempted value */
if( fee > exemption ) /* if fee greater than exempted value return exemption */
     return exemption;
else   /* else return fee */
    return fee;
return fee;
}

double fee_Conf_Reg(){
double fee;
std :: cout << " Enter registration and conference fee :";
std :: cin >> fee; /* read and return reg and conf fee */
return fee;
}
double hotelExpns(){
double expenses;
std :: cout << " Enter hotel expenses :";
std :: cin >> expenses;   /* read expenses of the hotel */
double exemption = 90 * numOfDays(); /* calculate exempted value */
if( expenses > exemption ) /* if greater than exemption return exemptin */
    return exemption;
else /* else return expenses */
    return expense;
}

-----------------------------------------------------------------------------------------------

/* hope this helps */

/* if any queries please comment */

/* thank you */

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote