Intro to Java Classwork: Mean Calculator, Part 2
Write a Java program named "MeanCalculatorPart2.java" that uses a
'while' loop to ask for and get from the user an unlimited number
of integers.  The user should enter one number per line, and should
press the ENTER key after each entry.  The user should press the
ENTER key on a line by itself (with no number) to indicate that
he/she is done entering numbers.

Since you will be getting an unknown number of integers from the
user and having the user press ENTER when done, you will need to
get each number as a string, and then convert it to an integer.

Your program should not store the user's numbers, and after the
user is finished entering numbers, your program should display the
average (arithmetic mean) of all of the user's numbers, rounded to
(up to) two decimal places, depending on how many digits come after
the decimal point.  That is, if the average has zero, one, or two
digits after the decimal point, do not perform any rounding or add
any extra zeros to the end of the number.  But if the mean has more
than two digits after the decimal point, round to two decimal places.
For example, 7.486 becomes 7.49, 21.854 becomes 21.85, 307.09 stays
at 307.09, 6.8 stays at 6.8, and 52 stays at 52 (not 52.0).

Your program does not need to perform any error trapping.  That is,
you may assume that the user will enter only integers (no decimal
numbers or strings).

For this program, other than the 'Scanner' class, you may not
import or use any external methods.  However, it is okay to put
all of your code inside the 'main' method of your program.


As always, all of your code must be your own, written entirely and
only by you within your online CodeHS.com account.  You must never
copy/paste, receive, view, or in any way use code that was created
or modified by another person, entity, or artificial intelligence.


Advanced Option #1
In addition to computing the average of the user's numbers, also
compute and display the median of the numbers.  The median is the
middle number (or numbers) when the list of numbers is sorted in
numerical order.  If the user enters an odd amount of numbers, then
the median is just the single middle number once the user's numbers
have been sorted.  If the user enters an even amount of numbers,
then the median is the average of the two middle numbers once the
list of numbers has been sorted.  For this advanced option you may
store the user's numbers in a list, and it is acceptable to import
classes containing methods for storing and sorting.

Advanced Option #2
In addition to computing the average of the user's numbers, also
find and display the mode (or modes), if any exist, in the set of
numbers entered by the user.  The mode of a list of numbers is
the number that occurs most often (more than any of the other
numbers in the list).  There can be multiple modes in a list of
numbers if two or more numbers occur the same number of times, and
more than any of the other numbers in the list.  If every number
in the list occurs exactly one time, then the list has no modes.
For this advanced option you may store the user's numbers in a
list, and it is acceptable to import classes containing methods
for storing and sorting.