Question: Please write code in Java: Overview: For this assignment, youre going to search and sort 1D arrays. This doesnt seem like a big deal, but

Please write code in Java:

Overview: For this assignment, youre going to search and sort 1D arrays. This doesnt seem like a big deal, but sorting is fundamental to working with large sets of data because it leads to search times of log2n. Since youve already covered 1D arrays in the lab, theres not a lot of explanation. Assignment 5A:Names: In your lab, you learned how to sort an array of numbers. For this first part of the assignment, you will use Exchange Sort (which you learned about in your lab) to sort an array of letters. Write a program that prompts the user to enter 5 names. The names are stored in a string array of 5 elements and uses Exchange Sort to alphabetize the names and returns the names in alphabetical order. Note: If you are using Java, you need to call the compareToIgnoreCase() method to compare elements in the string array. If you are using C#, you will need to call the CompareTo() method. Note: If you are using C++, you need to use the string class. See the appendix for more information. Your output should look like the samples below. User input is in bold. Sample Output 1 Enter 5 names: Name 1: Tom Name 2: Jerry Name 3: Ginny Name 4: Kari Name 5: Edward Names in order are: Edward Ginny Jerry Kari Tom Sample Output 2 Enter 5 names: Name 1: jim Name 2: aaron Name 3: cole Name 4: traviS Name 5: jIn Names in order are: aaron cole jim jIn traviS

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!