Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C++ please The manager of a football stadium wants you to write a program that calculates the total ticket sales after each game. There

in C++ please

The manager of a football stadium wants you to write a program that calculates the total ticket sales after each game. There are four types of ticketsbox, sideline, premium, and general admission. After each game, data is stored in a flat file in the following form:

ticketPrice numberOfTicketsSold Sample data are shown below: 250 5750 100 28000 50 35750 25 18750

The first line indicates that the ticket price is $250 and that 5750 tickets were sold at that price. Output the number of tickets sold and the total sale amount. Format your output with two decimal places.

To solve this problem, you must create the input data file manually. To do this in CodeBlocks, go to the File menu and select New and then Empty File. A popup will ask if you want to add this file to the project. When you say yes, you will have to name the file. It is best to put a .txt extension on the file name. This type of file is called a flat file. A flat file is similar to a spread sheet in that all the fields (columns) contain the same type of information and the records (rows) contain different data values.

Source code and output showing test results (screen shot or picture)

have all please:

File name included as comment at top of source file

IPO chart included as comments following the file name

Variable names are meaningful

Program compiles

Program produces correct results

Program is thoroughly tested and test output included

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions