Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise # 3 :The manager of a football stadium wants you to write a program that calculates the total ticket sales after each game. There

Exercise #3: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 file in the following form:ticketPrice numberOfTicketsSold. .Sample data saved in the input file tikets.txt are shown below:25057501002800050357502518750The first line in the input file indicates that the box ticket price is AED250 and that 5750 tickets were sold at that price. Your program should read the data from the input file named tikets.txt and output the total number of tickets sold and the total sale amount. Here is the sample output for the above input data that must be saved in an output file named totalSales.txt:Sample output:ticketPrice numberOfTicketsSold 25057501002800050357502518750 The total Sales is 6493750Submission: Save the project as HW2_EX3

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

Step: 3

blur-text-image

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

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

5-4 What are the current computer software platforms and trends?

Answered: 1 week ago

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago