• 100% Satisfaction Guarantee
LogicPro, Engineer
Category: Homework
Satisfied Customers: 12741
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
29751445
LogicPro is online now

I need to see this answer, I just spent 3.00 to see and I

Customer Question

I need to see this answer, I just spent 3.00 to see and I cannot get to it.
Submitted: 1 year ago.
Category: Homework
Expert:  ATLProg replied 1 year ago.
Hello I don't have solution but I can help if you post complete question text.
Also let me know by when you need this dobe
Customer: replied 1 year ago.

Here is the original question sent to you 17 days ago.
Assume the Scores array is parallel to

Resolved Question:

For LogicPro only
Assume the Scores array is parallel to the Players array (both arrays are below).
Scores array
Scores[0] = 198
Scores[1] = 486
Scores[2] = 651
Scores[3] = 185
Scores[4] = 216
Scores[5] = 912
Scores[6] = 173
Scores[7] = 319
Scores[8] = 846
Scores[9] = 989
Players Array
Players[0] = "Joe"
Players[1] = "Ann"
Players[2] = "Marty"
Players[3] = "Tim"
Players[4] = "Rosy"
Players[5] = "Jane"
Players[6] = "Bob"
Players[7] = "Lily"
Players[8] = "Granny"
Players[9] = "Liz"
Write a looping program that presents the user with 3 options:
1) Sort Output by Players
2) Sort Output by Scores
3) Exit Program
When the first option is selected, sort the Players array in alphabetical order, keeping the Scores array parallel. Add code that determines the highest and lowest scores in the list. Include code to display each player’s score and name in the sorted order. Below the sorted list display the highest and lowest scores in the list and the name of the player who received that score. Your sort by Player output display should look like this:
Scores Sorted by Player:
486 Ann
173 Bob
846 Granny
912 Jane
198 Joe
319 Lily
989 Liz
651 Marty
216 Rosy
185 Tim
-----------------------------------
989 Highest Score by Liz
173 Lowest Score by Bob
When the second option is selected, sort the Scores array in numerical order, keeping the Players array parallel. Add code that determines the average score of the entire list. Include code to display each player’s score and name in the sorted order. Below the sorted list display the average of all scores in the list. Your sort by Scores output display should look like this:
Players Sorted by Scores:
173 Bob
185 Tim
198 Joe
216 Rosy
319 Lily
486 Ann
651 Marty
846 Granny
912 Jane
989 Liz
---------------------------
498 Average Score
You may use either the Bubble Sort or the Selection Sort algorithms.
You MUST use Modular Programming techniques by using Sub Modules (Sub Charts in RAPTOR) in your program. Your "main" module should not be very large.
You may NOT "hard code" the numbers for highest, lowest and average scores. These must be discovered through algorithms. If the array data is changed, these should automatically be calculated with the new data.
This is due Friday

Submitted: 17 days ago.

Category: Homework

Expert:  ATLProg replied 1 year ago.
Expert:  LogicPro replied 1 year ago.
Hi,
Welcome here.
You should be using "For LogicPro only" at the start of your questions to ensure question comes to me or I may not be able to help
You can ask me again using "For LogicPro only" at the start of your questions like other customers to get instant answers. It will ensure that question is for me.
so you can come back and ask me a question anytime.
We can continue the conversation until you're satisfied and rate my answer as excellent. I can address follow up questions and I'm always here to help.
Thank you for using this site!
Customer: replied 1 year ago.

The error is in the beginning of the sort loops, j > 9, should be 10 because as it is, it only sorts 9 of the players or their scores, not all 10. When you replace 9 with 10 in all places, then you get an error that states, players doesn't have 11 elements. Not Good!

Expert:  LogicPro replied 1 year ago.
Can you provide me screenshot, when it is not sorting the output.
Customer: replied 1 year ago.

Do you mean of the error?

Expert:  LogicPro replied 1 year ago.
yes
Expert:  LogicPro replied 1 year ago.
Customer: replied 1 year ago.

https://www.dropbox.com/s/j3nhapxkyonsrs8/Screenshot%202015-05-16%2021.36.56.png?dl=0

This time it works but gives the wrong data output, Granny is not the highest score, Liz is.

Expert:  LogicPro replied 1 year ago.
It is showing correct output. Here it is:
Customer: replied 1 year ago.

Its choice 1 to sort by players, the highest score that prints is Granny with 846, it should be Liz with 989.

https://www.dropbox.com/s/j3nhapxkyonsrs8/Screenshot%202015-05-16%2021.36.56.png?dl=0

Expert:  LogicPro replied 1 year ago.
Choice 1 is Sort by player name not by player score.
And choice 2 is sort by player score.
Customer: replied 1 year ago.

Yes, but at the bottom of option 1 are the results, the highest and lowest scores print out, and your program lists Granny with the highest score, it should be liz.

Option 2 prints out the average score at the bottom.

Expert:  LogicPro replied 1 year ago.

You need to spend \$3 to view this post. Add Funds to your account and buy credits.
Expert:  LogicPro replied 1 year ago.
Hi again,
Just following up with you to see how everything is going and if you have more questions for me.
You can ask me again using "For LogicPro only" at the start of your questions like you do to get instant answers.
It will ensure that question is for me.
so you can come back and ask me a question anytime.
I hope you found the information in my answer helpful, and if so, please let me know, here. Thank you!
Thanks very much for using Just Answer!
Best wishes
LogicPro