Question: Define a method that searches an array for a value. It should take the target value and the array as input parameters. If the value
Define a method that searches an array for a value. It should take the target value and the array as input parameters. If the value is found, the method returns its index position; otherwise, the method returns 1. You can use the algorithm from Chapter 2 if you like. Test your method bypassing values into it, asking the user for a target value, running a search, and displaying the appropriate message about the outcome of the search.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
