Question: Develop a Java program that meets the following requirements: 1 . In your Java class, develop a class method that meets the following requirements: (

Develop a Java program that meets the following requirements: 1. In your Java class, develop a class method that meets the following requirements: (a) has a signature matching int methodName(int[] array, int searchkey), finds and returns the integer index of basketball players number searchkey in the array array (if it exists) The signature of a Java method includes its name and the types of its formal parameters. For example, the formal parameter types of this method are integer array and integer (b) have the best Big Oh complexity you can achieve based on the search techniques that is the most efficient algorithm. In comments above the method, explain what you believe your methods Big Oh complexity is (constant, logarithmic, linear, quadratic...) and why Hint: consider sorting your array before searching. 2. Implement the following in your main method: (a) Create a map data structure object to hold associations between player number (key, an integer) and team member name (value, a String). Put an entry into the map for 3-5 player numbers, giving each member a unique name for example, one entry could have the key 23 and value Michael Jordan(b) Obtain the player numbers from the map, and add them all to a set data structure. Then, demonstrate checking whether the set contains a particular player number of your choice. (c) Copy and insert the player numbers into an array, then search for the same player number in the array using your search method 1.

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 Programming Questions!