Answered step by step
Verified Expert Solution
Link Copied!

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 project2.cpp 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 8 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 8 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 first-place team. If two or more teams have the exact same best toss, you have to display all of them as the first-place finishers.
You may assume that the total number of teams entered into the
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

More Books

Students also viewed these Databases questions

Question

Understand the historical shifts of civic engagement.

Answered: 1 week ago

Question

Describe a persuasive message.

Answered: 1 week ago

Question

Identify and use the five steps for conducting research.

Answered: 1 week ago

Question

List the goals of a persuasive message.

Answered: 1 week ago