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 program/project/driver class YourNameAssignment2 and the following classes:
YourNameArray:
A new class that contains an array called Array of 10 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: ARRAY=[Element0, Element1,
..., ElementN-1] 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.3
YourNameBubbleSort that sorts the array Array using bubble sort and outputs BUBBLE SORT and prints
the sorted array using YourNamePrint method.4
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 4 sorting algorithms
above, their complexity in Big-O 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 user-defined MyList class and have an // Left as an exercise comment in the
body5. Add an additional YourNamePrint method that prints the list in the format: [Element0, Element1,
..., ElementN-1] where ElementK is the number from position K in the YourNameList
YourNameArrayList:
A complete version of the user-defined 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=[ Element0, Element1,..., ElementN-1] where ElementK is the number from
position K in the YourNameArrayList
YourNameLinkedList:
A complete version of the user-defined 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=[ Element0, Element1,..., ElementN-1] where ElementK is the number
from position K in the YourNameLinkedList
YourNameQueue:
A complete version of the user-defined GenericQueue class that codes all the methods
and uses a YourNameLinkedList instead of the pre-defined LinkedList. Add an
additional YourNamePrint method that prints the list in the format: QUEUE=[ Element0, Element1,...,
ElementN-1] where ElementK is the number from position K in the YourNameQueue.
YourNameAssignment2 driver class main method:
Creates an array of 10 integers, read 10 values from the user/console, and build instances of the user-
defined lists above (YourNameArray, YourNameArrayList, YourNameLinkedList, and YourNameQueue) with
the 10 values and test/demonstrate ALL their functionality/methods from the classes especially the
YourNamePrint and YourNameSortAlgorithmComplexity, and the 4 sorting methods for YourNameArray.
Your program should be user-friendly
(prompt the user for the input using a descriptive message) and be well-documented/commented.

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!