Question: Write a program that will display the below menu. (1) Selection Sort [2] Insertion Sort [3] Bubble Sort [4] Exit [4] Exit Choose an option:

Write a program that will display the below menu. (1) Selection Sort [2] Insertion Sort [3] Bubble Sort [4] Exit [4] Exit Choose an option: 4 Bye!! Using array of integer with a size of 10, the program will allow the user to select from the above options. Use the below program structure and complete the five methods. public class Secting Alge{ public static void Print(int ar[]) { Il To complete } public static void Selection(int an[]) { Il To complete } public static void Insertion(int arc() { To complete public static void Bubble(int arc[]) { Il To complete } public static void main(String args[]) { Il To complete } Your program output should be similar to the following [1] Selection [2] Insertion (3] Bubble [4] Exit Choose an option: 1 --Selection sort iterations-- 5 3 8 2 2 3 8 5 2 3 8 5 2 3 5 8 [1] Selection [2] Insertion [3] Bubble [4] Exit Choose an option: 2 --Insertion sort iterations-- 5 3 8 2 3 5 8 2 3 5 8 2 2 3 5 8 [1] Selection [2] Insertion [3] Bubble [4] Exit Choose an option: 3 --Bubble sort iterations-- 5 3 8 2 3 5 8 2 3 5 2 8 3 2 5 8 2 3 5 8 [1] Selection [2] Insertion [3] Bubble
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
