Question: In java using arrays try to do as simple as can be following every direction The Name Game Lab objective To read, search and sort,


The Name Game Lab objective To read, search and sort, an Array of strings Assignment Download the following 2 files from Blackboard. Make sure you save both of the files in the same folder. period2.ixt or period3.txt depending on which class you are in. Name Game java The text file contains a list of all the students in your class (first name only). The java program will read the list of names from the text file and store each name in an array. Your assignment is to write the body of the 4 methods defined in the NamoG java file. Below is a description of the task of each method. ame print List Public static void printlist (Stringt) array) This method should print a list of all the names in the array numbered For example 2 Sally 3 Harry shuffle public static void shuffle (Stringti array) This method should mix up all the elenents in the array one way to shuttle a list is to pick 2 random elements in your list and swap them Repeat thia proceno 20 time or search public static int search (string 1 array, string key This method the array the You should perform a linear or tial search on the starting from the element position to the end of the array. If you find the "key" in the array, then you should return the position of the key. If you do not find the "key" in the array then you should return a value of (negative one averageLength public static double averageLength string (I array This method should return the average length of the names in the array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
