Question: Array Searching Using the classes from the text, LincarScarch.java and BinaryScarchjava, write a Java program that will scarch the array: int[) ids-(25, 43, 45, 50,

 Array Searching Using the classes from the text, LincarScarch.java and BinaryScarchjava,

Array Searching Using the classes from the text, LincarScarch.java and BinaryScarchjava, write a Java program that will scarch the array: int[) ids-(25, 43, 45, 50, 59, 61, 66, 69, 70, 72, 79, 81, 93, 95,98 Use the following array of scores where the index of each element is associated with the id in the ids array at the same index, eg the person with id 045 has a score of 9, the score for the person with id 045 is stored in scoresI2]. int1 scores (8, 3, 9, 10. 10. 5, s, 10, s. 8, 7, 3, 1. 7. 8 1. Write a method that is passed the scores that averages the scores and display the number of scores along with the average. Invoke (call) the method from your main method. 2. Allow the user to enter an id ( key value to scarch for). You will only need to choose one method (a lincar search or a binary search) to search the array. Display the score associated with the id or an appropriate message if the id is not found. 3. Allow the user to enter a new score for the id entered above. Replace the appropriate value in the scores array. 4. Invoke the average method again to display the new average. You may find the example used in class useful: TestSearchArray.java

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!