Question: 1 ) General Description In this assignment you will use and test two array - based sorting algorithms selection sort and merge sort. You will

1) General Description
In this assignment you will use and test two array-based sorting algorithms selection sort and merge sort. You will need System.nanoTime() to measure running time.
2) Specific Guidelines
1) Create a new project that contains the following classes:
a) XSort>: includes selection sort and merge sort algorithms as methods.
b) Driver: for testing
2) XSort: two primary methods should be implemented: selection sort and merge sort. Add any necessary private methods and states that are needed to help the two sort algorithms.
3) The Driver class should provide a menu-based interaction with the user. Menu items should be at least:
a) Generate random array of BigDecimal/BigInteger datatype
b) Print ONLY first 10 elements of the array
c) Selection sort the array
d) Merge sort the array
e) Print timing of the two algorithms each experiment (10 different times)

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!