In Java Write a program which should be able to store 2 quiz scores for a maximum of 5 students. Your program should declare 3 arrays to store names and two scores for each of the students. Your program should declare methods to add, delete, update information for students. Your program should also allow to print the list of all students with their scores and also it should allow to print students whose average is less than 5. Your main function should have  all theses options in a loop. (Hint: For Delete, just set the name to null. While printing, print the values only when name is not null). You need to pass arrays and student data to your functions.  Following is a sample run: 1: Add a student record2: Delete a student record3: Update a student record4: Print all student records5: Print all student records who average of quiz is below 5. Enter a number: 1Enter name:JohnEnter Quiz 1 Score :9Enter Quiz 2 Score:10Student Successfully added   1: Add a student record2: Delete a student record3: Update a student record4: Print all student records5: Print all student records who average of quiz is below 5. Enter a number: 2 Enter name:EthanStudent Successfully deleted   1: Add a student record2: Delete a student record3: Update a student record4: Print all student records5: Print all student records who average of quiz is below 5. Enter a number: 3Enter name:EdwardEnter Quiz 1 Score :8Enter Quiz 2 Score:7Student Successfully updated   1: Add a student record2: Delete a student record3: Update a student record4: Print all student records5: Print all student records who average of quiz is below 5. Enter a number: 4 Name      Quiz1       Quiz2---- -----   -----           -------John            9                    10Peter           8                     2Rose            9                    9Edward       7                     5Ethan           8                    6 1: Add a student record2: Delete a student record3: Update a student record4: Print all student records5: Print all student records who average of quiz is below 5. Enter a number: 5 Name  Quiz1  Quiz2----    -----    -----

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In Java Write a program which should be able to store 2 quiz scores for a maximum of 5 students. Your program should declare 3 arrays to store names and two scores for each of the students. Your program should declare methods to add, delete, update information for students. Your program should also allow to print the list of all students with their scores and also it should allow to print students whose average is less than 5. Your main function should have  all theses options in a loop. (Hint: For Delete, just set the name to null. While printing, print the values only when name is not null). You need to pass arrays and student data to your functions. 

Following is a sample run:


1: Add a student record
2: Delete a student record
3: Update a student record
4: Print all student records
5: Print all student records who average of quiz is below 5.

Enter a number: 1
Enter name:
John
Enter Quiz 1 Score :
9
Enter Quiz 2 Score:
10
Student Successfully added

 

1: Add a student record
2: Delete a student record
3: Update a student record
4: Print all student records
5: Print all student records who average of quiz is below 5.

Enter a number: 2

Enter name:
Ethan
Student Successfully deleted

 

1: Add a student record
2: Delete a student record
3: Update a student record
4: Print all student records
5: Print all student records who average of quiz is below 5.

Enter a number: 3
Enter name:
Edward
Enter Quiz 1 Score :
8
Enter Quiz 2 Score:
7
Student Successfully updated

 

1: Add a student record
2: Delete a student record
3: Update a student record
4: Print all student records
5: Print all student records who average of quiz is below 5.

Enter a number: 4

Name      Quiz1       Quiz2
---- -----   -----           -------
John            9                    10
Peter           8                     2
Rose            9                    9
Edward       7                     5
Ethan           8                    6

1: Add a student record
2: Delete a student record
3: Update a student record
4: Print all student records
5: Print all student records who average of quiz is below 5.

Enter a number: 5

Name  Quiz1  Quiz2
----    -----    -----

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education