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

  Write an application that enables users to enter student ID

Write an application that enables users to enter student ID and three exam scores. Provide a method to compute and returnthe overall exam average.  Provide another method that prints all scores and the average value formatted with no digits to the ri..

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  What are the various types of dns servers and their purpose

question 1 what is the role of dns how is it structured and why it is necessary?question 2 what are the different kinds

  Uml exercise automated teller machine atmnbspbrief

uml exercise automated teller machine atmnbspbrief statement of purposean atm is an electronic device designed for

  This project mainly focuses on explaining your

this project focuses on demonstrating your understanding of java collections. before attempting this project be sure

  Write an application that uses an array

Write an application that uses an Array to store 10 messages of type String. You will store this Array with 10 messages of your choosing.

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Design and implement an applet called circles

Design and implement an applet called Circles that draws 50 circles of random diameter in random locations. If the diameter of a circle is less than a certain value, the circle is ?lled with the color yellow.

  Create an application that uses a graphic interface

Create an application that uses a graphic interface to capture room assignment data for dormitory residents and writes that data to a random access output file.

  Write a program that creates an enumeration representing

Sherri rolls a 3 and decides to continue. She then chooses to roll two more times (6, 1). Because she rolled a 1, Sherri's turn ends and she earns 0 points.

  Write a program that displays a drawing popular hangman game

Write a program that displays a drawing for the popular hangman game, as shown in Figure 15.32(c). draws a sketch for the hangman game.

  Write a program that asks a user for a file name and prints

Write a program that asks a user for a file name and prints the number of characters, words, and lines in that file.

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