
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
EXERCISE C++ CODING
Based on the image attached, build a complete problem analysis table that displays all of the Inputs, Processes and Outputs.

Transcribed Image Text: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. Calculate the vehicle expense as $0.27 per mile driven
• Parking fees (The company allows up to $6 per day. Anything in excess of this must be paid by the
employee.)
• Taxi fees, if a taxi was used anytime during the trip (The company allows up to $10 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 must be
paid by the employee.)
• The amount of each meal eaten. On the first day of the trip, breakfast is allowed as an expense if the
time of departure is before 7 a.m. 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 p.m. On the last day of the trip, breakfast is
allowed if the time of arrival is after 8 a.m. Lunch is allowed if the time of arrival is after 1 p.m. Dinner is
allowed on the last day if the time of arrival is after 7 p.m. The program should only ask for the amounts
of allowable meals. (The company allows up to $9 for breakfast, $12 for lunch, and $16 for dinner.
Anything in excess of this must be paid by the employee.)
The program should calculate and display the total expenses incurred by the businessperson, the total
allowable expenses for the trip, the excess that must be reimbursed by the businessperson, if any, and
the amount saved by the businessperson if the expenses were under the total allowed.
Input Validation: Do not accept negative numbers for any dollar amount or for miles driven in a private
vehicle. Do not accept numbers less than 1 for the number of days.
Only accept valid times for the time of departure and the time of arrival.
*Format your output accordingly.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- To best illustrate the benefits of dynamic programming, it is suggested that you utilize examples from the actual world.arrow_forwardThis course covers the compiler and testability hint.arrow_forwardPassing parameters rather than utilising a global variable in a C programme has both benefits and cons.arrow_forward
- What are some of the various approaches to data flow documentation?arrow_forwardIt is not easy for a compiler to generate efficient and error-free code without considering a wide range of parameters. Explain?arrow_forwardIs there any benefit to using dynamic programming while making a series of connected decisions? What's the story?arrow_forward
- In order for a compiler to generate reliable and efficient code, it must take into consideration a wide range of conditions. Explain?arrow_forwardUsing concrete examples, please provide your thoughts on the software structure review procedure.arrow_forwardA manager of a department at Google wants to schedule 15-min coffee chat between two employees every week for his 6 employees. Design and write a program to help this manager. Each employee should have a meeting with a new person. So, no meeting with the same person until they meet all the other colleagues. Use functional programming or object-oriented programing. You can have your own design to cover the requirements but you should consider a design with better time complexity. You can use any data structures (lists, dictionaries, stacks, queues, ...) The number 6 here is an example and imaging there are "n" (an even number) employees in the group (for this example n =6) Every week each employee should have a meeting and just one meeting with one person. Every week they should have a meeting with a new person. Until week 5 ( n-1 weeks) they should have a meeting with the same person. employees = [ employee_1, employee_2, employee_3, employee_4, employee_5, employee_6] It means…arrow_forward
- What parts of compiler design must be emphasised in order to guarantee that the end result is both effective and trustworthy? Explain.arrow_forwardThis course will cover testability and quickly explain the compiler.arrow_forwardPlease explain the pros and cons of using dynamic programming in comparison to more conventional approaches.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education