Question: Assume the following array is parallel to the Scores array of Programming Challenge 3. Write a program to sort this Player array in alphabetical order,

Assume the following array is parallel to the Scores array of Programming Challenge 3. Write a program to sort this Player array in alphabetical order, keeping the Scores array parallel. Use either of the sort routines covered in this chapter. Include code to display each player’s name and score. To get your column data to line up as shown, you can use the tab indicator, /t, in your Write statements, as shown in Section 8.5.

Player[0]

Your display should look like this:

Ann ........................486
Bob .........................73
Granny ..................846
Jane .......................912
Joe .........................198
Lily ........................319
Liz .........................989
Marty ....................651
Rosy ......................216
Tim .........................85

Player[0] "Joe" Player[1] "Ann" Player[2] Player[4] = "Rosy" "Marty" "Tim" Player[3] Player[5] = "Jane" Player[6] Player[8] Player[7] Player[9] "Lily" = "Liz" "Bob" "Granny" !!

Step by Step Solution

3.44 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Assume that the Players and Scores arrays has been loaded with 10 values as given Pl... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Prelude to Programming Questions!