Question: Using the Random class, write a program to generate exactly 3 random integers. The user is prompted for a minimum integer and a maximum integer

Using the Random class, write a program to generate exactly 3 random integers. The user is prompted for a minimum integer and a maximum integer that are read in using Scanner nextInt(). The program returns exactly 3 values between and could include the minimum and maximum.

Example output. Note there is not a newline at the end of each prompt. The user types 1 and then Enter which results in the output shown:

Random Number Calculator Enter minimum integer: 1 Enter maximum integer: 6 Three integers are: 3 5 6 

For testing purposes, we require being able to predict the 'random' results. Setting a seed for the random number generator accomplishes this. In your program, set the seed for the instance (object) of the Random class to Config.SEED. Config.SEED is a constant named SEED declared in the Config.java file. Don't use the number in your RandomGenerator program, just use the constant

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!