Starting from:
$22.99

$16.99

LiFiUnit5 Solution

The file must be called <LastInitialFirstInitialUnit5.java

Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter.

Only submit the .java file needed to make the program run. Do not submit the .class file or any other file.

LiFiUnit5.java - Main Method

Get input for maximum random number into a String variable.

Use the Integer wrapper class to parse the integer out of the string and store in an integer variable.

Get input for number of rounds into an integer.

Create a Header and Data format string to output results as shown in the sample at the bottom.

Utilizing a for loop, output results meeting following criteria:

One line should be output for each round.

Each line should contain:

Round Number.

Random number chosen.

Current Maximum of all random numbers so far.

Utilize Math class to determine current Max

Current Minimum of all random numbers so far.

Utilize Math class to determine current Min

Current Total of all numbers added together.

Total should be calculate using a compound operator.

Current average of all random numbers so far.

Average should be shown with 2 decimal places.

Output “End Run…” after all lines have been output.

 Mimic the output in the sample below exactly. Numbers will change due to random and selection but format will be the same.

 

I have attached a file of some examples of how it must look.

More products