Create a program named student1.java that will use arrays to store student names and grades assume each student has a student id that directly indexes a storage slot in a set of parallel arrays.
Create a
Your program should prompt the user to input a student id, name and grade. Let the user continue to enter grades using a sentinel value of -1 for the id to indicate that the input is complete.
Once input is complete the program should call the following display() and classavg() methods.
Then prompt the user for a student id and use the findid() method below to find and display the students name and grade associated with the id.
Write a method named display() that will display back the list of students.
Write a method named classavg() that will calculate the class average and display the result.
Write a method named findid() that will find a student based on the id and display the students name and grade.
Add a comment to the end of your code file with the following: What is the O() of the display() and classavg() methods. What is the O() of the findid() method.
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 7 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)