Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Menus, Decisions, and Validation In August 2 0 1 9 at the age of 1 5 my son competed in his first Strong Man competition.

Menus, Decisions, and Validation
In August 2019 at the age of 15 my son competed in his first Strong Man competition. There
were three events: (1) Stone over, (2) Farmers frame medley, and (3) Axle deadlift.
You must write a program that does the following:
1. Asks for the names of the 3 teen competitors.
2. Display a menu so the user can decide which of the events he/she wants to enter the
information in for. (Use a switch statement here.)
3. For each of the events, the competitors get TWO attempts and the highest result of
their attempts should be used for determining their ranking for the event. Be sure that
you determine their best attempt BEFORE determining the rankings for each event.
4. If the user selects Farmers Frame Medley he/she should then be asked for the number
of seconds it took each competitor to complete. Seconds should include up to 2 decimal
places.
a. Determine how each competitor ranks in the event. The competitor with the
lowest time earns first place.
b. First place gets 3 points, 2nd place gets 2 points, 3rd place earns 1 point.
5. If the user selects Axle Deadlift he/she should then be asked for the number of pounds
the competitor was able to lift.
a. Determine how each competitor ranks in the event. The competitor with the
highest weight will earn first place.
b. First place gets 3 points, 2nd place with 2 points, and third place with 1 point.
6. If the user selects Stone Over Bar he/she should then be asked for the number of stones
the competitor was able to lift.
a. Determine how each competitor ranks in the event. The competitor with the
highest number will earn first place.
b. First place gets 3 points, 2nd place with 2 points, and third place with 1 point.
7. Your program should display the following information:
a. The name of the event
b. The ranking of the event
i. Include competitors name and the attempt that was used in the ranking
ii. Display 1st,2nd, and 3rd places.
iii. Display the points earned for the ranking placement.
8. Be creative with your display, use output formatting where appropriate.
IMPORTANT NOTE:
We have not yes discussed loops, therefore you will enter information for one event and
have it displayed on the screen. You will then run the program again, to show the next
event, and a third time to show the third event. Also, make sure that the user does not enter
any values that are less than 0. If so, the program should end. c++ code only
no swaps, voids etc!!!!!!!. we can only use if, else if, else and switches. the only thing i need for the code is the swaps to be replaced i am not sure how what i can use in place of a swap. it needs to be a copy and paste if switch for all three parts
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

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions

Question

2. Outline the functions of nonverbal communication

Answered: 1 week ago