ASSIGNMENT 2B Assignment 2B tests your knowledge of sorting algorithms (Chapter 23). For the assignment, you...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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. 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. 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. 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. 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.
Expert Answer:
Related Book For
Data Analysis and Decision Making
ISBN: 978-0538476126
4th edition
Authors: Christian Albright, Wayne Winston, Christopher Zappe
Posted Date:
Students also viewed these programming questions
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Skip to main content Lab 11: A Web Server The goal of this lab is to write a simple, but functional, web server that is capable of sending files to a web browser on request. The web server must...
-
You are the manager of an educational facility and have beenasked to predict analyze the electric cost for 2020 based on the following 12 months of Information, You know the electric cost has both...
-
County Bank has $300,000 of 7% debenture bonds outstanding. The bonds were issued at 103 in 2016 and mature in 2036. The bonds have annual interest payments. Requirements 1. How much cash did County...
-
Portions of the financial statements for Avatar Technologies are provided below. AVATAR TECHNOLOGIES Income Statement For the Year Ended December 3 1 , 2 0 2 4 Net sales $ 2 9 5 , 0 0 0 Expenses:...
-
When to use the official form complaints?
-
Presented below are selected accounts for Acevedo Company as reported in the worksheet at the end of May 2012. InstructionsComplete the worksheet by extending amounts reported in the adjusted trial...
-
RLC LiRLC Limited had a large allowable capital loss of $77,625 on one transaction during its current taxation year ended December 31. In addition, the following information pertains to its situation...
-
The following is Wolastoq Tours Limited's unadjusted trial balance at its year end, November 30, 2018. The company adjusts its accounts annually. Additional information: 1. The insurance policy has a...
-
How does the maturity date affect the liquidity and marketability of a financial instrument? 8. How do investors or borrowers typically plan for or manage the maturity date of their financial...
-
Write a function splitTime() that takes a time represented in seconds and returns the number of hours (0-23), the number of minutes (0-59) and the number of seconds (0-59). For example, if the time...
-
what are the benefits and disadvantages of marketing and customer relationship? Can someone help explain why is it important to understanding Marketing and Customer Relationships?
-
Boxwood Company sells blankets for $36 each. The following information was taken from the inventory records during May. The company had no beginning inventory on May 1. Boxwood uses a perpetual...
-
A company currently has $265,000 of equity and is planning a $115,000 expansion. The company currently earns $79,500 in net income, and the expansion will yield $50,000 in additional income before...
-
Packaging Solutions Corporation manufactures and sells a wide variety of packaging products. Performance reports are prepared monthly for each department. The planning budget and flexible budget for...
-
9. Determine and sketch y(t) = x(t) *h(t) for the following values of T (a) T=4 (b) T=2 (c) T=3/2 (d) T=1 x(t) = S(t-kT) k=18 h(t) = (t+1)(u(t+1)u(t))+(-t+1)(u(t)-u(t-1))
-
H.J. Heinzs annual dividends were as follows: 1990 ..............$0.540 1991.............. 0.620 1992 .............. 0.700 1993.............. 0.780 1994 .............. 0.860 1995 .............. 0.940...
-
A U.S. Navy recruiting center knows from past experience that the heights of its recruits have traditionally been normally distributed with mean 69 inches. The recruiting center wants to test the...
-
Referring to the retirement example in Example 16.6, rerun the model for a planning horizon of 10 years; 15 years; 25 years. For each, which set of investment weights maximizes the VAR 5% (the 5th...
-
Other sensitivity analyses besides those discussed could be performed on the product mix model. Use Solver Table to perform each of the following. In each case keep track of the values in the...
-
Determine the fundamental frequency of a uniform fixed-fixed beam carrying a mass \(M\) at the middle by applying Rayleigh's method. Use the static deflection curve for \(W(x)\).
-
Applying Rayleigh's method, determine the fundamental frequency of a cantilever beam (fixed at \(x=l\) ) whose cross-sectional area \(A(x)\) and moment of inertia \(I(x)\) vary as \(A(x)=A_{0} x /...
-
Using Rayleigh's method, estimate the fundamental frequency for the lateral vibration of a uniform beam fixed at both the ends. Assume the deflection curve to be \[W(x)=c_{1}\left(1-\cos \frac{2 \pi...
Study smarter with the SolutionInn App