Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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. One of the arrays should be named "stu_name[]" The other "stu_grade[]" 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.

Write a method named display() that will display back the list of students. 2. Write a method named classava() 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. 5. 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.

Create a program named student2.java This program will differ 1. from program 1 in that it will use three arrays to store student id, names and grades. Store the data in the array in sequence as it is entered. Make room for 100 students.

Otherwise this program should do all of the same tasks that are required in program 1. Add a comment to the end of your code file with the following: B. What is the O() of the display() and classavg() methods. What s 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

=+ Interviews with key people. Which people?

Answered: 1 week ago

Question

4. What actions should Bouleau & Huntley take now?

Answered: 1 week ago