Write a Java program that meets the following requirements.
1. The mean of a list of numbers is its arithmetic average. The median of a list is its middle value
when the values are placed in order. For example, if a list contains 1, 4, 7, 8, and 10, then the
mean is 6 and the median is 7. Write an application that allows you to enter five integers and
displays the values, their mean, and their median. Save the file as MeanMedian.java
2. Revise the MeanMedian class so that the user can enter any number of values up to 20. If the list has an even number of values, the median is the numeric average of the values in the two middle positions. Save the file as MeanMedian2.java
3. Now, modify the program to throw an exception if an entered value is not an integer. If an
exception is thrown, display an appropriate message and allow the user to reenter the value.
Save the file as MeanMedianHandleException.java
Ability to:
Follow established programming conventions for writing java programs
Create appropriate variables for the data.
Create an int array.
Calculate the mean and median of numbers entered.
Able to correctly use a try…catch block.
Able to use for loops
Able to write IF statements.
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.
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 moreEach 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 moreThanks 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 moreYour 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 moreBy 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