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, 21.06.2019 17:00
In addition to using the icons to adjust page margins, a user can also use
Answers: 1
question
Computers and Technology, 22.06.2019 02:00
What is the largest decimal number that can be represented by a binary number with 4 place values? (remember, each place in a binary number has a value of a power of 2, starting in the ones place with 20.)
Answers: 3
question
Computers and Technology, 22.06.2019 10:50
Using least squares fitting, you are to fit the data sets to the following models and solve for the parameters ai , where i is the index of the parameter. the input/output data for the systems are linked in the bblearn site. for each of the systems use matlab to plot the supplied data vs. the model fit on one plot. include your code in the solutions. (a) linear fit "lineardata.mat" y=a1x^3 + a2x^2 + a3x + a4 (b) plant fit "plantdata.mat g(s) = a1/(s + a2)
Answers: 1
question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
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, 29.10.2020 03:10
question
Arts, 29.10.2020 03:10
Questions on the website: 13722360