Question: Design a program / project / driver class YourNameAssignment 2 and the following classes: YourNameArray: A new class that contains an array called Array of
Design a programprojectdriver class YourNameAssignment and the following classes:
YourNameArray:
A new class that contains an array called Array of integers, a constructor that takes an array as
parameter to create the array Array, and the following sorting methods:
YourNamePrint that prints the array Array to the console in this format: ARRAYElement Element
ElementN where ElementK is the number from position K in the Array
YourNameInsertionSort that sorts the array Array using insertion sort and outputs INSERTION SORT
and prints the sorted array using YourNamePrint method
YourNameBubbleSort that sorts the array Array using bubble sort and outputs BUBBLE SORT and prints
the sorted array using YourNamePrint method
YourNameMergeSort that sorts the array Array using merge sort and outputs MERGE SORT and prints the
sorted array using YourNamePrint method.
YourNameQuickSort that sorts the array Array using quick sort and outputs QUICK SORT and prints the
sorted array using YourNamePrint method.
YourNameSortAlgorithmComplexity that outputs to the console for each of the sorting algorithms
above, their complexity in BigO notation and an explanation of which one of the sorting
methods is better and why. This method does not compute anything, just outputs the complexity and
explanation as text.
YourNameList:
A complete version of userdefined MyList class and have an Left as an exercise comment in the
body Add an additional YourNamePrint method that prints the list in the format: Element Element
ElementN where ElementK is the number from position K in the YourNameList
YourNameArrayList:
A complete version of the userdefined MyArrayList class that codes all the methods and
uses the YourNameList instead of MyList. Add an additional YourNamePrint method that prints the list in
the format: ARRAYLIST Element Element ElementN where ElementK is the number from
position K in the YourNameArrayList
YourNameLinkedList:
A complete version of the userdefined MyLinkedList class that codes all the methods
and uses the YourNameList instead of MyList. Add an additional YourNamePrint method that prints the
list in the format: LINKEDLIST Element Element ElementN where ElementK is the number
from position K in the YourNameLinkedList
YourNameQueue:
A complete version of the userdefined GenericQueue class that codes all the methods
and uses a YourNameLinkedList instead of the predefined LinkedList. Add an
additional YourNamePrint method that prints the list in the format: QUEUE Element Element
ElementN where ElementK is the number from position K in the YourNameQueue.
YourNameAssignment driver class main method:
Creates an array of integers, read values from the userconsole and build instances of the user
defined lists above YourNameArray YourNameArrayList, YourNameLinkedList, and YourNameQueue with
the values and testdemonstrate ALL their functionalitymethods from the classes especially the
YourNamePrint and YourNameSortAlgorithmComplexity, and the sorting methods for YourNameArray.
Your program should be userfriendly
prompt the user for the input using a descriptive message and be welldocumentedcommented
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
