Need programming Help with a Java Programming assingment

timer Asked: Feb 14th, 2016

Question description

Purpose: This program will generate a series of random numbers and produces a table containing these values and some statistics about them.

  • The program should define a Header and Data format string to output results as shown in the sample at the bottom.
  • The program will get from the user the maximum random number to be computed (an integer). It will get this value into a String variable.
  • The program will use the Integer wrapper class to parse the integer out of the String and store in an integer variable.
  • Then the program will ask the user how many random numbers will be generated. It should also receive this number in a String and use the Integer wrapper class to get the integer into an integer variable.
  • Using a for loop, output a table with the following characteristics:

o  Print a header of titles using a header format and printf  (this should be before the loop, not inside the loop).

o  There should be one line per each random line generated.

o  Each line should contain:

§  A line number, also known as round.

§  The generated random number.

§  Current Maximum of all generated random numbers so far. 
         (Utilize Math class to determine current Max)

§  Current Minimum of all generated random numbers so far.
         (Utilize Math class to determine current Min)

§  Current Total of all generated random numbers so far added together.
         (Total should be calculate using a compound operator)

§  Current average of all generated 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.


NOTE: Complete your activity and submit it by clicking “Submit Assignment”


Total Percentage



Max Random Number and Number of Rounds will vary based on input:

Below are 3 different random examples based on the input given. Your output will vary but the format will be the same.

CS151 U5A.1.png

CS151 U5A.2.png

CS151 U5A.3.png

Tutor Answer

(Top Tutor) Studypool Tutor
School: UCLA
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors