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 (9th Edition)
- use pycharm/pythonarrow_forwardMake 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_forward
- Lab Activity 8: Functions Objectives: The objective of this Lab Assignment is to use functions. As you have learned already, the best approach to solve a problem is to break it down into individual steps. Do not forget about what you have previously learned and seen. This assignment will be asking you to use the knowledge you have acquired since the beginning of the semester. PART 1: Percentage of amino acid residues. Write a function that takes two arguments-a protein sequence and an amino acid residue code - and returns the percentage of the protein that the amino acid makes up. Test your function on the following examples: Sequence MSRSLLLRFLLFLLLLPPLP MSRSLLLRFLLFLLLLPPLP maralllrfllfllllpplp MSRSLLLRFLLFLLLLPPLP Amino acid residue M R L Yarrow_forwardProgramarrow_forwardThe Issue: You have a function that accepts a variety of parameters. It is impractical to provide them as traditional parameters. So, what are you going to do?arrow_forward
- Hi 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_forwardAs parameters to functions, arrays are passed by value. Select one: O True O False gearrow_forwardThis program should be designed and written by a team of students. Here are some suggestions: o One student should design function main, which will call the other functions in the program. The remainder of the functions will be designed by other members of the team. o The requirements of the program should be analyzed so each student is given about the same work load. o The parameters and return types of each function should be decided in advance. o The program can be implemented as a multi-file program, or all the functions can be cut and pasted into the main file. Here is the assignment: Write a program that can be used by a small theater to sell tickets for performances. The theater’s auditorium has 15 rows of seats, with 30 seats in each row. The program should display a screen that shows which seats are available and which are taken. For example, the following screen shows a chart depicting each seat in the theater. Seats that are taken are represented by an * symbol, and seats…arrow_forward
- This program should be designed and written by a team of students. Here are some suggestions: o One student should design function main, which will call the other functions in the program. The remainder of the functions will be designed by other members of the team. o The requirements of the program should be analyzed so each student is given about the same work load. o The parameters and return types of each function should be decided in advance. o The program can be implemented as a multi-file program, or all the functions can be cut and pasted into the main file. Here is the assignment: Write a program that can be used by a small theater to sell tickets for performances. The theater’s auditorium has 15 rows of seats, with 30 seats in each row. The program should display a screen that shows which seats are available and which are taken. For example, the following screen shows a chart depicting each seat in the theater. Seats that are taken are represented by an * symbol, and seats…arrow_forward:The parameters specified in the function heading are known as formal parameters value parameters actual parameters original parametersarrow_forwardWhy do you need to include function prototypes in a program that contains user-defined functions? (5)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