Answered step by step
Verified Expert Solution
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 # 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 #:
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:
The first line in the input file indicates that the box ticket price is AED and that 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 HWEX
Sample data saved in the input file tikets.txt are shown below:
The first line in the input file indicates that the box ticket price is AED
and that
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
The total Sales is
Submission: Save the project as HWEX
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started