Question: Java programming A teacher wants to know the student who takes the highest score in the quiz, so teachers keeps an ArrayList < Student >.

Java programming

A teacher wants to know the student who takes the highest score in the quiz, so teachers keeps an ArrayList < Student >. Write a program that helps the teacher to enter all quiz scores and names, adds them to an quiz object, and displays the best student's name.

For the problem create quiz class, student class and a driver class for them.

For Quiz class use followings:

private studentList:ArrayList

private score:double

public addQuizScore(String studentName, double score)

public getNameOfBestStudent():String

For Student class use followings:

private studentName:string

private score:double

public student(String studentName, double score)

public getName():String

public getScore():double

For the driver code expected outcome of the program should be as below:

1. Please enter the name of the student: for example: abc

2. Please enter the quiz score of the student: for example:80

3. Is there any other student? (Y/N) : suppose Y

4. Please enter the name of the student: for example:efg

5. Please enter the quiz score of the student: for example: 87

6. Is there any other student? (Y/N) : suppose N

7. the best scoring student in the quiz: efg

Please use Jframe, JOptionPane . showInputDialog for driver code to enter the values.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!