Implement a sorting algorithm for inclusion in a package

Assignment Help JAVA Programming
Reference no: EM13706077

As a new and eager employee of NSUTech, Inc. (Nova Southeastern University Technology Incorporated) you've been asked by your employer to implement a sorting algorithm for inclusion in a package for a lucrative client.

However, your boss just wants you to implement one of the simple, quadratic sorting algorithms. To prove that this would be a big mistake, you've decided (on your own) to prove to your idiot boss that it's worth the extra effort to implement one of the O(n log n) sorting algorithms. For this project, you will implement and compare five sorting algorithms: bubble sort, insertion sort, selection sort, quicksort, and either mergesort or shellsort. Your main program will then do the following:

1. Ask the user for the size n of the list he/she wants to sort.

2. Create an array of size n and fill it with random integers between 1 and n. If n<=100, display the random array on the screen.

3. Run each of your sorts on this array. You must make a deep copy of the array before sorting it, or your second sort will have an easy time of it. Use the System.currentTimeMillis() function to determine the running time of each sort.

4. If n<=100, display the sorted arrays on the screen (they better be the same!).

5. Display the time each sort used to sort the array.

Once you have your program working, use it to plot a graph. Have the x-axis represent n, and the y-axis the running time. Use n=10000, 20000, ..., 100000. Plot all sorting algorithms on the same graph (use different colors or line styles). You shall use a spreadsheet program (e.g., MS Excel) or some other program to do this for you. (Will your boss be convinced?)

Reference no: EM13706077

Questions Cloud

Local college has tasked you to develop a database : Suppose a local college has tasked you to develop a database that will keep track of students and the courses that they have taken. In addition to tracking the students and courses, the client wants the database to keep track of the instructors..
A business function or operation and the business rules : Identified one (1) example of a business function or operation and the business rules associated with that business function / operation. You will build upon that discussion as you describe the main entities or objects of that business function..
Describe how the original vision of e-commerce : In a 500 to 1000 word narrative, describe how the original vision of e-commerce did not work out for most e-tailers, but how the online retail marketplace is nevertheless the fastest growing channel in retail commerce.
For a unimolecular dissociation reaction : For a unimolecular dissociation reaction: A2 2 A, the change of the amount of the product per unit time, CA, and the average rate of this reaction, vmean, are related
Implement a sorting algorithm for inclusion in a package : Prepare a targeted plan in which you present your detailed strategies to recruit and select 20 Engineers to hire (full-time or part-time) within 8 months - Implement a sorting algorithm for inclusion in a package for a lucrative client.
What is the partial pressure of ne : A mixture of He, Ne, and Ar has a pressure of 21.7 atm at 28.0 °C. If the partial pressure of He is 2.66 atm and that of Ar is 1.71 atm, what is the partial pressure of Ne?
Equilibrium calculations : At a particular temperature, 12.0 moles of SO3 is placed into a 3.0L rigid containerand the SO3 dissociates by the reaction 2SO3 (g) 2SO2 (g) + O2 (g)
How many moles of air are present : The volume of the Metrodome in Minneapolis is 1.70*10^10 L. The pressure exerted by the 20 fans is 1.02 atm at 18 degree C. How many moles of air are present?
How appropriate were the various sampling design decisions : Describe the sampling strategy. How appropriate were the various sampling design decisions and problems did you find with the questionnaire

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a class called employee with name idno address and

create a class called employee with name idno address and phone number as attributes. create the setter and getter

  Write a program that reads words from a text file

Write a program that reads words from a text file and displays all the nonduplicate words in ascending order. The text file is passed as a command-line argument.

  Integers as a parameter and returns the number

Write a method maxOccurrences that accepts a list of integers as a parameter and returns the number the number of times the most frequently occurring integer

  Write java program to reverse contents of original array

Write down the Java program method named reversal which returns the new array which is a reversal of original array. Use [5.0, 4.4, 1.9, 2.9, 3.4, 3.5] to test method.

  Java application which creates bank records

Write down a java application which creates 10000 bank records and the allow user ti enter a balance and customer account info. using a an account number.

  Add a button that will read the text fields

Create a GUI with two text fields for inputting the dimensions of a rectangle. Identify these two text fields as Length and Width with labels. Add a button that will read the text fields and cause the GUI to display the area and perimeter of the r..

  What is the greatest common divisor

What is the greatest common divisor of the Fibonacci numbers f100 and f101 by Euclid algorithm.

  1 write a recursive instance method called

1 write a recursive instance method called countconnectedpipesint row int col. the method must not contain any loops

  Write ijvm program to multiply two hexadecimal numbers

Write the IJVM program that multiplies two (hexadecimal) numbers. The user inputs the hex numbers and the result is printed out. The program then accepts another pair of numbers.

  Create a secure parts inventory catalog system

You will create a secure Parts Inventory Catalog system using Model 2 architecture. The application will require a user to have the proper access right to enter the system, and when satisfied, presents the catalog of items currently available in t..

  Explain how cookies are used to implement sessions

Describe a set of four methods that a queue would need to implement using a circular array and show the Java code to implement them if using an implementation given the outline definition below. Do not use any methods of the Collection classes.

  Determine when the application should stop looping display

Write an application that reads a series of pairs of numbers as follows: 1) product number 2) quantity sold - Create an application in java

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd