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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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