Question: Thank you for helping with this question Create a program named student2.java that will use three arrays to store student id, named stu_id[], student names,

Thank you for helping with this question

Create a program named student2.java that will use three arrays to store student id, named stu_id[], student names, named stu_name[] and student grades, named stu_grade[].

Store the data in the array in sequence as it is entered. Make room for 100 students.

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.

  1. Write a method named display() that will display back the list of students.
  2. Write a method named classavg() that will calculate the class average and display the result.
  3. 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. Compare the big O() values between the first program and the second. Write a paragraph describing the pros and cons of these two different implementations of the student data storage.

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!