Backstory (if you need one)
You're in charge of keeping track of the results of a foot race, but you didn't write down the finishers in any particular order, and your notes might also contain a few corrections. Write a program where you can enter your records, that will then print out the full results in order.
User interaction:
"None"
Things you are not required to deal with:
Basic Point Breakdown:
4pts: Collecting number of runners and allocating a blank list of correct size5pts: Correctly looping during input and storing names using correct index2pt: Stop editing when user enters "-1"5pts: Output race results in order as a separate method2pt: State that a racer is missing (rather than just printing "None")2pt: formatting, coding style, comments2pt extra credit: Number suffixes
Sample Runs:
How many people ran in the race? 3What place would you like to edit? (-1 to finish) 3Who finished in 3rd place? ShawnWhat place would you like to edit? (-1 to finish) 1Who finished in 1st place? BurtonWhat place would you like to edit? (-1 to finish) 2Who finished in 2nd place? JulietWhat place would you like to edit? (-1 to finish) -1The results of the race are:Burton finished in 1st place.Juliet finished in 2nd place.Shawn finished in 3rd place.Sample run 2:How many people ran in the race? 6What place would you like to edit? (-1 to finish) 4Who finished in 4th place? JayWhat place would you like to edit? (-1 to finish) 3Who finished in 3rd place? JesseWhat place would you like to edit? (-1 to finish) 4Who finished in 4th place? HunterWhat place would you like to edit? (-1 to finish) 5Who finished in 5th place? JayWhat place would you like to edit? (-1 to finish) 1Who finished in 1st place? BarryWhat place would you like to edit? (-1 to finish) -1The results of the race are:Barry finished in 1st place.You didn't say who finished in 2nd place.Jesse finished in 3rd place.Hunter finished in 4th place.Jay finished in 5th place.You didn't say who finished in 6th place.
Sample run 3:How many people ran in the race? 25What place would you like to edit? (-1 to finish) 14Who finished in 14th place? ToddWhat place would you like to edit? (-1 to finish) 17Who finished in 17th place? RoddWhat place would you like to edit? (-1 to finish) 25Who finished in 25th place? MartinWhat place would you like to edit? (-1 to finish) 6Who finished in 6th place? SheriWhat place would you like to edit? (-1 to finish) 9Who finished in 9th place? EdnaWhat place would you like to edit? (-1 to finish) 2Who finished in 2nd place? PattyWhat place would you like to edit? (-1 to finish) 18Who finished in 18th place? HansWhat place would you like to edit? (-1 to finish) -1The results of the race are:You didn't say who finished in 1st place.Patty finished in 2nd place.You didn't say who finished in 3rd place.You didn't say who finished in 4th place.You didn't say who finished in 5th place.Sheri finished in 6th place.You didn't say who finished in 7th place.You didn't say who finished in 8th place.Edna finished in 9th place.You didn't say who finished in 10th place.You didn't say who finished in 11th place.You didn't say who finished in 12th place.You didn't say who finished in 13th place.Todd finished in 14th place.You didn't say who finished in 15th place.You didn't say who finished in 16th place.Rodd finished in 17th place.Hans finished in 18th place.You didn't say who finished in 19th place.You didn't say who finished in 20th place.You didn't say who finished in 21st place.You didn't say who finished in 22nd place.You didn't say who finished in 23rd place.You didn't say who finished in 24th place.Martin finished in 25th place.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here