# C++ program

**aflngd**

**PROGRAM DESCRIPTION**

You are going to revise the ticket-processing program (Program #5) to make it a more professional program, one that will be more representative of commercial program design. You have now studied the use of additional functions to aid main in the overall processing. Real computer programs consist of many of these functions. Some are pretty small, intended to perform a simple but very important calculation. Others are a bit larger in scope. For this program you will need to revise Program #5 to incorporate such functions.

Since Program #5 is the background for this program, you will definitely want to have its directions handy. I will leave out many of the details that you can glean from Program #5, and simply concentrate on the changes required. Essentially, when you have this program finished, it should perform nearly the same as Program #5 did. Of course, you might want to improve some of its look and feel, but the ticket-selling operation should still work the same.

**SPECIFIC DIRECTIONS**

Use the following functions by name in your design for this program. If you wish to use more, that’s OK, as long as you include these as well. Hint: you will find it easiest just to accumulate all the final totals in main.

main Your central loop will be here, as well as a lot more. Use the other functions for

their specific purposes.

get_ticket_type Present a menu of the three ticket types and an option to quit. Input the user’s choice

and make sure it is a valid choice. If it is invalid, then ask for another choice. Keep

asking until the user enters a valid ticket type. Return to main the user’s choice.

find_ticket_price Receives the ticket type and returns the price of one ticket, including free tickets!

apply_discount Receives the ticket cost, applies the discount, and returns the discounted cost.

disp_purchase Displays the information for one customer purchase: the type of ticket(s) purchased;

how many were purchased; and the cost of the purchase. (If the cost is the discount

cost, only show that, not the original cost.)

disp_final_report Format and display the final numbers. See the totals required to be displayed and an

example report in the Program #5 directions.

Before displaying the final report, you must clear the screen, so the final totals will look great! Your final results must be laid out in a business-like report with headings, etc. A simple bunch of statements, like “Total number of tickets sold: 1345” will not be acceptable.

This C++ solution should be **Program6 Solution name**. Zip the solution for submitting, as usual.

## TURN IN: a data dictionary for this program, a complete flowchart, and the zipped solution directory. Submit everything using the Dropbox in D2L.

**EXTRA CREDIT (10 pts)**

How much money did we “lose” by selling some tickets at a discount? After the final report, display how many tickets of each type that were purchased with discount coupons, and also display how much more money we would have made if we hadn’t accepted the coupons at all. (We may get greedy and cancel this program if it cuts too much into our revenue!)

- 8 years ago
- 20

**Answer(1)**

Purchase the answer to view it

- progr5.cpp

**Bids(1)**

**other Questions(10)**

- Give a numerical example to show that a monopolist’s marginal revenue can be upward-sloping over part of its range. Hint:...
- What do I do if I need to "determine the number of moles of HCl using a volume to mole...
- Sharika is buying her first home in Allen,TX. she is torn between two houses. house A has 2,150 square feet...
- Global warming. PLEASE ANSWER ALL QUESTIONS
- how did the creatures of he bingle bog react to the nightingale singing?
- Busi 530 Corporate Finance Exam 2
- Sand has to ride the bus to summer camp.the camp runs for 14 days. the bus fare per round trip...
- (sinx)(tanx+cotx)
- three congruent squares of concrete are placed next to each other to form a rectangular walkway. the perimeter of...
- Exponential and Logarithmic Equations 1. 4^3x=64

**Tips(0)**

**Udemy(0)**