Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSIGNMENT 2B Assignment 2B tests your knowledge of sorting algorithms (Chapter 23). For the assignment, you are going to design a class (the program/project/driver

image text in transcribed

ASSIGNMENT 2B Assignment 2B tests your knowledge of sorting algorithms (Chapter 23). For the assignment, you are going to design a class (the program/project/driver class file should be called YourNameAssignment2B; replace Your Name with your actual name) without any fields, just the exact methods (with exact names, parameters, return values, functionality, and order): Method Name Description Your NameGetSize A method without parameters that reads a valid integral number n between 1 and 10 from the user (if the number is not valid the methods should ask for a new integral number until the number is correct) and returns it A method that reads 10 integral numbers from the user, stores them into an array A, and returns the array A. A method with an integral array A parameter that create a copy of the array A meaning creates another array with the same integral numbers as A and returns it. YourNameGetArray YourNameCopyArray YourNamePrintArray YourNameInsertionSort YourNameBubbleSort YourNameMergeSort YourNameQuickSort main A method with an integral array A parameter that prints the array A to the console on the same line, values separated by tabs: A0 A1 A2 An-1. A method with an integral array A parameter that sorts A using insertion sort algorithm. A method with an integral array parameter that sorts A using bubble sort algorithm. A method with an integral array A parameter that sorts A using merge sort algorithm. A method with an integral array parameter that sorts A using quick sort algorithm. Use the YourName GetArray method to read the values into the YourNameArray array. Output INSERTION SORT On a separate line. I Use the YourNameCopyArray method to create a copy of the YourNameArray array into YourNameArrayI and then YourNamePrintArray method to print YourNameArrayI. Use the YourName Insertionsort method to sort the array YourNameArrayI and the YourNamePrintArray method to print it. Output BUBBLE SORT on a separate line. Use the YourName CopyArray method to create a copy of the YourNameArray array into YourNameArrayB and then Your Name PrintArray method to print YourNameArrayB. Use the YourNameBubbleSort method to sort the array Your NameArrayB and the YourNamePrintArray method to print it. Output MERGE SORT on a separate line. Use the Your Name CopyArray method to create a copy of the Your NameArray array into YourNameArrayM and then Your Name PrintArray method to print YourNameArrayM. Use the YourNameMergeSort method to sort the array YourNameArrayM and the YourNamePrintArray method to print it. Output QUICK SORT on a separate line. Use the YourNameCopyArray method to create a copy of the YourNameArray array into YourNameArrayo and then Your Name PrintArray method to print YourNameArrayQ. Use the YourNameQuickSort method to sort the array YourNameArrayo and the YourNamePrintArray method to print it. Create a Microsoft Word screenshots document called Your NameAssignment2B-Screenshot.docx (replace Your Name with your actual name) that contains screenshots of the entire JAVA source code in the editor window (for all the JAVA classes) and the entire output window (from the driver class). If the entire class JAVA source code or the output does not fit in one screenshot, create multiple screenshots and add them to the document. Submit YourNameAssignment2B.java Java source code and YourNameAssignment2B-Screenshots.docx screenshots document on eCampus under Assignment 2B. Do not archive the files (no ZIP, no RAR, etc.) or submit other file formats. Review the files in your eCampus submission confirmation window. 1 Use the exact/precise names (spelling, caps), parameters, returned values, functionality, and do not add or remove fields or methods. 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, to earn credit for the assignment. You can add additional helper/utility method to call inside the requested methods.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis And Decision Making

Authors: Christian Albright, Wayne Winston, Christopher Zappe

4th Edition

538476125, 978-0538476126

More Books

Students also viewed these Programming questions