Write a computer program that prompts the user for a number, creates an array for that number of random integers, and then usees the bubble sort to order the array. The program should print out the ar

Write a computer program that prompts the user for a number, creates an array for that number of random integers, and then usees the bubble sort to order the array. The program should print out the array prior to the call to the sorting algorithm and afterwards. You can write the program in either Java, C , C#, or whatever language you are most comfortable in.Do Not use an API from the language library. Write the program to perform the sort. Repeat 1 but use selection sort this time.Again, write out the program for the selection sort. DO not use the language library.1 and 2 are primarily intended to make sure that your algorithms work.Once you are convinced your programs work, do the following Write a computer program that prompts the user for onenumber, n for the number of items in the array to sort, and create and sort 1000 different arraysof this size timing the run to get an average time to sort an array of this size. Then do the following:Initiate a variable running_time to 0Create a for loop that iterates 1000times.In the body of the loop,Create an array of n random integersGet the time and set this to start-time (notice the sort is started after each array is built. You want to time the srt process only). You will have to figure out what the appropriate command is in the programming language you are using to find the time(Important: Do not start the timer until after the array is created).Use bubble sort to sort the arrayGet the time and set this to end-timeSubtract start-time from end-time and add the result to total_timeOnce the program has run, noteThe number of items sortedThe average running time for each array (total_time/1000)Repeat the process using 500, 2500 and 5000 as the size of the array. Repeat 3 using selection sort. You now have 6 data points ( the averages from the three array sizes for the two sort algorithms) Create a spreadsheet showing the results of 3 and 4 and create a graph to graphically represent the information. Show both sort algorithms on the same graph for comparison. Write a one page document explaining the results, bearing in mind that both algorithms have a complexity of O(n^2) and what you know about complexity analysis. Use your knowledge of complexity analysis to explain your results.Please submit Program code for 1 Program code for 2 Program code used in 3and the results of thethreeprogram runs Program code used in 4and the results of thethree program runs The spreadsheet created in 5 The report. In the report, say which machine you ran the experiments on (type of processor, RAM, etc). Explain your experiment and why you feel you received the results you observed.

Haven’t Found The Relevant Content? Hire a Subject Expert to Help You With
Write a computer program that prompts the user for a number, creates an array for that number of random integers, and then usees the bubble sort to order the array. The program should print out the ar
Post Your Own Question And Get A Custom Answer
Hire Writer

superadmin (28431)
New York University
15 MILLION STUDENTS HELPED!

Hire an Expert to Help you

Hire Verified Expert

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Have a homework question? Get help from verified tutors now!

Are You Looking For Assignment Help? We Can Certainly Assist You

Sometimes it is hard to do all the work on your own

Let us help you get a good grade on your paper. Get professional help and free up your time for more important courses. Let us handle your;

  • ~Dissertations
  • ~Essays
  • ~All Assignments

  • ~Research papers
  • ~Term papers