Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

---> In Java Please Your program will sort a two dimensional array(5 * 4) based on the following: a) The entire array should be sorted

---> In Java Please image text in transcribed
image text in transcribed
Your program will sort a two dimensional array(5 * 4) based on the following: a) The entire array should be sorted using bubble sort based on the 1 column in ascending order and display the entire array. b) Reset the array to its original contents. The entire array should again be sorted using selection sort based on the 2 column in descending order and display the entire array, c) Reset the array to its original contents. The entire array should again be sorted using shell sort based on the 3" column in ascending order and display the entire array d) Reset the array to its original contents. The entire array should again be sorted using insertion sort based on the 5 row in ascending order and display the entire array Ask the user for a number, search for that number in the 5 row of the array that was sorted via insertion sort, using binary search. Display the entire column. Your array could be declared as a global variable since it is being used everywhere. For example, given the following array: 532 16 98 1017 471118 259 12 794 10 5 row Insertion 7 Ascending 1 column 2 column 3rd column Bubble Selection Shell Ascending Descending Ascending After bubble sort 259 12 4711 18 532 16 794 10 98 1017 After selection sort (Descending order) 794 10 981017 471118 259 12 532 16 Do the same kind of thing for shell sort (Ascending order based on the 3rd column) After Insertion sort 2 5316 109817 11 4718 9 25 12 4 79 10 What number are you searching for in the 5 row? 9 Make sure to modularize your program. Each of the sorts and searches must happen in their own functions. Reset the array to its original contents after each sort

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions