Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise # 3 JAVA JAVA JAVA JAVA JAVA JAVA JAVA JAVAJAVA JAVA JAVA :The manager of a football stadium wants you to write a program

Exercise #3 JAVA JAVA JAVA JAVA JAVA JAVA JAVA JAVAJAVA JAVA JAVA
: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. 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 tickets-box, 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:
250,5750
100,28000
50,35750
25,18750
The 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:
Submission:
Save the project as HW2_EX3
Sample data saved in the input file tikets.txt are shown below:
2505750
10028000
5035750
2518750
The first line in the input file indicates that the box ticket price is AED
250
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
2505750
10028000
5035750
2518750
The total Sales is
6493750
Submission: Save the project as HW-EX3
image text in transcribed

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

Intelligent Image Databases Towards Advanced Image Retrieval

Authors: Yihong Gong

1st Edition

1461375037, 978-1461375036

More Books

Students also viewed these Databases questions

Question

Evaluating Group Performance?

Answered: 1 week ago