Preview

Travel Expenses

Better Essays
Open Document
Open Document
1239 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Travel Expenses
Problem 1: Travel Expenses
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

You May Also Find These Documents Helpful

  • Good Essays

    limited to two meals per day in the buffet restaurants only and are not permitted to receive…

    • 15284 Words
    • 51 Pages
    Good Essays
  • Powerful Essays

    Busn 319 Marketing Plan

    • 3752 Words
    • 16 Pages

    Our diner includes two catering halls that accommodate between 25-150 guests for any occasion. We are open 24 hours a day, 365 days a year. Lunch and Dinner specials are served on weekdays.…

    • 3752 Words
    • 16 Pages
    Powerful Essays
  • Satisfactory Essays

    If the request is filled out after 10:00 am or 2:30 pm, please hand deliver the request to the kitchen so they can make the change on time.…

    • 94 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    The first criterion used to evaluate the total cost of our dining experience is that it must not exceed $25 per person. In today’s failing ECONOMY, deciding to dine out at a local restaurant can be somewhat of a daunting prospect, staying in budget will ensure a superior dining experience due to a mind at ease and wallet that’s not empty. Texas Roadhouse offers their customers an option for early dining. The early dining special for a total cost of $8.99 includes: 11 dinners to choose from, Monday through Friday until 6:00pm, and Saturday to Sunday until 3:00pm; on the other hand many working class citizens who work Monday through Friday are not able to participate in that exceptional dining experience due to a conflict in timing because of their specific work schedules.…

    • 812 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    1. Supporting point: ingredients for the food is bought two or three days in advance so…

    • 984 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    • Menu plan for three days, including the 3 main meals and 3 snacks (a.m., p.m., and…

    • 2996 Words
    • 27 Pages
    Satisfactory Essays
  • Better Essays

    Harbinger 05

    • 1053 Words
    • 4 Pages

    At seven the girls are allowed thirty minutes for breakfast, and at noon thirty minutes more for dinner, except during the first quarter of the year, when the time is extended to forty-five minutes. But within this time they must hurry to their boardinghouses and return to the factory, and that through the hot sun or the rain or the cold. A meal eaten under such circumstances must be quite unfavorable to digestion and health, as any medical man will inform us. After seven o'clock in the evening the factory bell sounds the close of the day's work.…

    • 1053 Words
    • 4 Pages
    Better Essays
  • Good Essays

    Reimbursable Expenses (invoiced at cost plus 10% with submission of receipts and documentation of all expenditures):…

    • 1107 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Milton Hershey

    • 370 Words
    • 2 Pages

    2. Meals, Clothing, Medical Care, Dental Care, and school supplies are provided free of charge to enrolled students.…

    • 370 Words
    • 2 Pages
    Good Essays
  • Better Essays

    10. Lunch/ breakfast should be taken only in school cafeteria. No eating permitted in class. No chewing gums and toffees allowed. Water bottle is allowed.…

    • 991 Words
    • 4 Pages
    Better Essays
  • Good Essays

    The guests are also served “very good food” as it will be their last meal .…

    • 1163 Words
    • 5 Pages
    Good Essays
  • Good Essays

    any time outside the hours of 8 am and 4 pm, or between the hours of 8 am and 4 pm but…

    • 1076 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Childcare Regulations

    • 217 Words
    • 1 Page

    • in all cases if a child is in attendance after 6:30, supper shall be provided…

    • 217 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Our first stop will be breakfast after you wake up on day one. You will be able to eat what ever your heart desires. Anything from a stack of pancakes to something completely unrelated to “breakfast”, like pizza. Choose wisely, you will be stuck with your breakfast for the rest of the tour!…

    • 1343 Words
    • 6 Pages
    Good Essays
  • Good Essays

    For Mama’s Café our targeted consumers are college students in the Downtown Boston area as well as tourists. We want to make sure that breakfast is an all-day option among the lunch options we will be providing. I think having an option all day breakfast will be good because many places such as Panera Bread and McDonald’s stop breakfast at 10:30 AM during weekdays and 11:00AM during the weekend. They can wake up late and still come and enjoy breakfast, even tourists can enjoy from it as well. If they want to go out into Boston and don’t want to have breakfast in the hotel.…

    • 254 Words
    • 2 Pages
    Good Essays