Group Project
20. Using Files—Travel Expenses
This program should be designed and written by a team of students. Here are some suggestions:
• 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 requirements 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 total 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 arrival 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.)
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
Starting Out With C++: Early Objects (10th Edition)
- Make sure to include flow-charts that cover: Overall program flow (use subprocess blocks to indicate where user-defined functions are called) Function that randomly generates birthdays - - Function that finds birthday matchesarrow_forwardPython code please. With in 10 min.arrow_forwardProgramarrow_forward
- Create Code to Assist in the Removal of #ifdef Statements from Function BodiesThe Issue: You're creating an application that will run on various platforms. As a result, there are several #ifdef statements scattered throughout the code. So many, in fact, that they make things appear bad and the code difficult to read.arrow_forwardHi this is my firs time so i have homeworek i need hlep in it : Create the principal program, which will complete the following tasks : a) Create a new Student object by reading the required details and by applying at least one type of data validation of your choice on the input. b) Read and save the list of module names and the list of module marks awarded to the student in the two assignments. c) Display the transcript of the student by calling the adequate method.d) Repeating the previous tasks until the user decides to exit I hope u will get my qustion u have to answer it my uesing online java compiler thenk you so much for helping mearrow_forwardWhy do you need to include function prototypes in a program that contains user-defined functions? (5)arrow_forward
- A function is a block of code that performs .a specific task True O False Oarrow_forwardFunction #2: largest Parameters: num1 - a floating point number being compared against num2 and num3 num2 - a floating point number being compared against num1 and num3 num3 - a floating point number being compared against num1 and num2 Description: Write a function that takes in three numbers as parameters and prints out the largest of the three. If two or all of the numbers are equal, or even all three, then just print the value once. Test Cases: >>>largest(433.1, 2340.32, 12323.7) 12323.7 >>>largest(12.0, 32.1, 32.1) 32.1 >>>largest(23.44, 23.44, 23.44) 23.44arrow_forwardIdentify the correct statements. Select ALL that apply. Question options: You can make your own custom modules. When a function is called, the item(s) inside the parentheses are called arguments. Global variables should be used in large programs. A variable declared inside main is inaccessible inside custom functions. Functions can be called inside other functionsarrow_forward
- 4arrow_forwardC++ beginnerarrow_forwardFUNCTIONS PROBLEM Find and fix the errors ( in PYTHON) #import math library #define functions #return type: float#Parameters: 2 floats(l and w)#This function returns the area of a rectangle with the given dimensionsdef RectangleArea(l,w):#return type: float#Parameters: 2 floats(l and w)#This function returns the perimeter of a rectangle with the given dimensionsdef RectanglePerimeter(l,w):#return type: float#Parameters: 1 floats(r)#This function returns the area of a circle with the given radiusdef CircleArea(r):#return type: float#Parameters: 1 floats(r)#This function returns the circumference of a circle with the given radiusdef CircleCircumference(r):#return type: None#Parameters: None#This function displays an introductiondef Intro():#return type: None#Parameters: 4 floats(rectArea, rectPer, circArea, circum)#This function displays the four values passed to itdef PrintInfo(rectArea, rectPer, circArea, circum ): #return type: float#Parameters: None#This function prompts the user for…arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning