subject

Write a program that asks for the name and number of points scored by two basketball players. Print out the players scores in alphabetical order according to the players names user the string method compareTo.

Then print which player scored more points. Here is an example output and what I have so far:

-Example output-

Enter player one’s name:

Tracy

Enter player two’s name:

Karen

Enter Tracy’s score

13

Enter Karel’s score

20

Karel scored 20 points

Tracey scored 13 points

Karel wins!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:30
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e.g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
How many points do i need before i can send a chat
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Why do we mark tlc plates with pencil and not with pen
Answers: 2
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
You know the right answer?
Write a program that asks for the name and number of points scored by two basketball players. Print...
Questions
question
Mathematics, 30.01.2020 17:48
question
Physics, 30.01.2020 17:48
Questions on the website: 13722359