Question: Part 1 : Design a program / project / driver class YourNameAssignment 2 and the following classes ( with exact 1 names, replace YourName with

Part 1: Design a program/project/driver class YourNameAssignment2 and the following classes (with exact1 names, replace YourName
with your actual first name or the name you go by, no spaces):
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 from Chapter 24(meaning you need to add the code for
the methods that were not coded in the book 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 from Chapter 24 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 from Chapter 24 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 from Chapter 24 that codes all the methods
and uses a YourNameLinkedList instead of the pre-defined LinkedList used in textbook. 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.
Adapt them to the assignment at hand and use the
appropriate names and add the code and requirements above. You should not add any additional classes or use the corresponding
pre-defined methods (e.g. use a List object inside the YourNameList, ArrayList object in the YourNameArrayList, etc.).
1 Use the exact names (spelling, caps), parameters, returned values, functionality. You are not going to earn any credit if the classes and methods
do not contain your actual name and do not have the exact/precise names and functionality. Yes, you may find examples in the textbook with
different names and cases and with other methods, but you will need to adapt them to have this exact names and cases.
2 You can use utility/helper methods for your sorting methods however the requested methods need to have the exact names (that include your
name in them, and use the array called Array of 10 numbers with the exact name). Make sure you document all the lines of code.
3 For example, if the array is 2,3,1,4,5,6,7,8,9,10 it is going to output:
INSERTION SORT: Array=[1,2,3,4,5,6,7,8,9,10]
4 For example, if the array is 2,3,1,4,5,6,7,8,9,10 it is going to output:
BUBBLE SORT: Array=[1,2,3,4,5,6,7,8,9,10]

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!