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

  • Satisfactory Essays

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

    • 984 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    facilities. As the cruises are “full meal and beverage” (i.e., passengers may eat and drink as…

    • 15284 Words
    • 51 Pages
    Good 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
  • 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

    Task 3 P3

    • 499 Words
    • 2 Pages

    The breakfast meal price is AED 12 and if you want coffee with it, the price will be AED 15.…

    • 499 Words
    • 2 Pages
    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
  • 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

    Dinner. The Firm does not expect you to go without dinner if you are working beyond the end of our regular business day. If you are required to work at least four (4) hours beyond your regular departure time, (and provided you have worked your regular, complete 8-hour shift and you have accounted for a 12-hour day (which means you have billed at least 10 hours and accounted for at least 2 hours of other work that can be billable or non-billable work activities for attorneys and paralegals), you will be reimbursed for the actual expenses of a dinner purchased locally, up to $20. You must provide a receipt for reimbursement with your expense report claiming the expenditure. Alcoholic beverages and groceries are not covered by this policy.…

    • 998 Words
    • 4 Pages
    Good 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
  • Good Essays

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

    • 1163 Words
    • 5 Pages
    Good 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

    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
  • 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

    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
  • Better Essays

    Disney World Vacation

    • 1872 Words
    • 8 Pages

    They have anything from quick meals like hot dogs to dining with characters. There are many dining plans to choose from, and the one I chose is The Disney Dining Plan. It includes 1 quick-service meal per person, per night, 1 table-service meal per person, per night, 1 snack per person, per night, and 1 drink mug per person, refillable at any quick-service restaurant at any Disney Resort hotel. I booked lots of places to sit down and eat and most of them are paid for! When the dining plan is used smart it can save tons of money! It helps save money that could be used for others things, such as, souvenirs. When the dining plan isn’t used, however, it can end up costing a lot of money if it isn’t used wisely. There are tons of quick service restaurants around the four parks like Pizza Planet in Hollywood studios and Casey’s Corner in the Magic Kingdom. Even if a guest isn’t on the dining plan, a nice meal on a Disney vacation is always recommended. For guest that are staying on property, reservations can be made 180 days in advance. Some restaurants are so popular that they fill up before half the day is even over, so it is important to have a plan ready for where the whole family want to eat on the vacation. Also it is important to have some extra reservations made just in case. When reservations are made, a card number is needed to reserve the spot so if no one shows up they can charge the guest $10 per person, but if cancellations are made it is important to do it one day in advance to avoid getting charged. Since I did the dining plan, I planned for my family and I to have nine places to eat at. Even though we are only staying seven nights, and we get seven table service meals paid for. I planned extra in case some get cancelled. Even though seven table services were given to us, we don’t have to use them. Table service credits can be transferred to quick service, but it isn’t the best option. By using the table…

    • 1872 Words
    • 8 Pages
    Better Essays