Java homework

Java 

Array Sorting, Traversal and Exception Handling

Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen.

Your menu should have 6 options:

1.     Add a number to the array

2.     Display the mean

3.     Display the median

4.     Print the array to the screen

5.     Print the array in reverse order

6.     Quit

Program particulars:

Use an array of type int to store the integers entered by the user.  There must be error checking on the input integer.  If it is negative, the program will print an error message and re-prompt. This process will continue until a non-negative integer is entered. You must use a try-catch structure to trap both types of input errors (like letters where numbers should go) and range errors (like -1).

You must write your own selectionSort utility method to sort your array.  Place the method in an external file named SortSearchUtil.java.

There must be error checking on the menu choice entered.  If the user enters a choice not on the menu, the program will print an error message, re-display the menu and re-prompt. This process will continue until a valid option value is entered.

Your solution must be modular.  The design of your methods is up to you, but the rules of “highly cohesive” and “loosely coupled” must be followed.

Your program should be well-documented.  Explain what you’re doing in your code. Be sure to include the usual name and assignment notes.

Note your program will have to sort your array before you can find the median.  Include your SortSearchUtil.java file which will contain your sort method.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyStudyWriters
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Nursing
Impressive writing
Customer 452547, February 6th, 2021
Business and administrative studies
excellent work
Customer 452773, March 9th, 2023
Social Work and Human Services
Although it took 2 revisions I am satisfied but I did receive it late because of that.
Customer 452603, March 25th, 2021
Business and administrative studies
excellent paper
Customer 452773, March 3rd, 2023
History
Looks great and appreciate the help.
Customer 452675, April 26th, 2021
Leadership Studies
awesome work as always
Customer 452773, August 19th, 2023
Humanities
Thank youuuu
Customer 452729, May 30th, 2021
Business and administrative studies
Thank you
Customer 452773, March 19th, 2023
Nursing
I just need some minor alterations. Thanks.
Customer 452547, February 10th, 2021
Business and administrative studies
Excellent job
Customer 452773, March 9th, 2023
fin571
EXCELLEN T
Customer 452773, March 21st, 2024
Business and administrative studies
Thank you for your hard work
Customer 452773, October 19th, 2023
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Close

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 and Thesis
  • Essays
  • All Assignments

  • Research papers
  • Terms Papers
  • Online Classes
Live ChatWhatsApp