5-9) (Find the two highest scores) Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score and the student with the second-highest score. SAMPLE RUN #4: Java TwoHighestScores Standard Output Hide Invisibles Enter.the.number of students:Student.1.of.6+ Enter student's.name: Enter.student's score: Student.2.of.6+ Enter.student's name: Enter student's score:student 3.of.6+ Enter student's name: Enter.student's score:Student.4 of.6 Enter student's name: Enter student's.score:Student.5.of.6+ Enter.student's name: Enter student's score:Student.6.of.6 Enter student's.name: Enter.student's.score: The highest.score.was.96.7.and Thomas Collins got-it The second highest.score was 93.3e.and.Amy Dickstein.got.it

Question

5-9) (Find the two highest scores)

Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score and the student with the second-highest score. 

5-9) (Find the two highest scores) Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the
student with the highest score and the student with the second-highest score.
SAMPLE RUN #4: Java TwoHighestScores
Standard Output
Hide Invisibles
Enter.the.number of students:Student.1.of.6+
Enter student's.name: Enter.student's score: Student.2.of.6+
Enter.student's name: Enter student's score:student 3.of.6+
Enter student's name: Enter.student's score:Student.4 of.6
Enter student's name: Enter student's.score:Student.5.of.6+
Enter.student's name: Enter student's score:Student.6.of.6
Enter student's.name: Enter.student's.score: The highest.score.was.96.7.and Thomas Collins got-it
The second highest.score was 93.3e.and.Amy Dickstein.got.it

Image Transcription

5-9) (Find the two highest scores) Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score and the student with the second-highest score. SAMPLE RUN #4: Java TwoHighestScores Standard Output Hide Invisibles Enter.the.number of students:Student.1.of.6+ Enter student's.name: Enter.student's score: Student.2.of.6+ Enter.student's name: Enter student's score:student 3.of.6+ Enter student's name: Enter.student's score:Student.4 of.6 Enter student's name: Enter student's.score:Student.5.of.6+ Enter.student's name: Enter student's score:Student.6.of.6 Enter student's.name: Enter.student's.score: The highest.score.was.96.7.and Thomas Collins got-it The second highest.score was 93.3e.and.Amy Dickstein.got.it

Expert Answer

Want to see the step-by-step answer?

See Answer

Check out a sample Q&A here.

Want to see this answer and more?

Step-by-step answers are written by subject experts who are available 24/7. Questions are typically answered in as fast as 30 minutes.*

See Answer
*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.
Tagged in
EngineeringComputer Science

Programing Language

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A

Q: use java Develop a program which allows the user to enter numbers into an array. Input will be as fo...

A: Program plan:Import the required packages.Define a class named “ArraySort”.Define a “main()” method....

Q: Prove that the following languages are not regular: (b) L = {anblak : k ≠ n + l}. (c) L = {anblak : ...

A: In the given question, multiple parts are there and we will solve only first three parts as no parti...

Q: How do you convert 172.16.20.55 to binary format?

A: 172.16.20.55 represents IP address in decimal format. In order to convert it into binary format we n...

Q: Hello,  I am trying to write a program in Pynthon. I do not know may be it is too much. Just need so...

A:  Program plan:Define a function named “main()”.Assign a file name or file path.Create an empty dicti...

Q: Consider the following segment of code:procedure Mvar x: integer;procedure A (c: integer)var a, b: i...

A: Instructions for drawing the runtime stack (at “a:= c-d;”):The stack includes the activation records...

Q: // java // book is starting out with java //chapter 12  (5)Theater RevenueA movie theater only keeps...

A: Program plan:Import required packages.Define a class named “TheatreGUI”.Declare the required variabl...

Q: I need help with the SQL query for the following question: 1.  Get the total number of reviews of mo...

A: The details about the table are given with table name and different entities. Here the table name is...

Q: Read in 5 letters from the keyboard, reverse the order of the second and next to last letters, and p...

A: Program to reading 5 letters from the keyboards and reversing the order of the second and next to la...

Q: Hi, please do you help with questions of Python? If so, I need help with the following: Write a prog...

A: Program Instructions:Use range() to print from 1 to 25.Use end in print() function to print the valu...