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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started