Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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, 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started