Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this project, you will write a program named project 2 . cpp that will help to determine the winner of the annual Collegiate Pumpkin
For this project, you will write a program named projectcpp that will help to determine the winner of the annual Collegiate Pumpkin Toss Invitational CPTI
The CPTI invites different community colleges to compete as teams to try to toss pumpkins as far as possible. Each school is assigned a team number and is given attempts to throw it You can use any technique you'd like, but the average is taken to determine which team is the winner.
You will need to determine each team's average toss distance in meters and identify the first place team.
An input file with team information contains records of all the tosses completed by each team. Each record begin with the team number and is followed by the distances for each toss. They average is calculated like so:
Each team's lowest two distances are discarded before the average is calculated.
Any team that has a distance recorded as a negative number means that the team was disqualified so no average will be displayed
Your program also needs to determine the numbers of qualified and disqualified teams.
Your program will begin by asking the user for the input file name first and then it will read the data into your program. After that, calculate the average distances for each team. Furthermore, your program has to determine the firstplace team. If two or more teams have the exact same best toss, you have to display all of them as the firstplace finishers.
You may assume that the total number of teams entered into the
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