Question: Develop a complete Java program for each of the following problems. Please name the programs as indicated and add proper program headers and output labels

Develop a complete Java program for each of the following problems. Please name the programs as indicated and add proper program headers and output labels as specified. Do not use loops, arrays, methods, or other concepts we did not discuss to date, please build on what we have covered to date.

Program #1 (10 points): Write a Java program (name it RandomNumbersYourname) that generates random numbers as follows.

a) A random integer number between 25 and 45 (inclusive).

b) A random integer number between -20 and 20 (inclusive).

c) A random integer number between -50 and -20 (inclusive).

d) A random floating-point number between 0.0 and 21.9999 (inclusive).

Properly label output for each part above, print the outputs on separate lines, and use the tab escape character (\t) to line-up the outputs after the labels (Formatting is also one of the grading item) as shown in this sample run:

a) A random integer between 20 and 80 (inclusive): 51 b) A random integer between -20 and 20 (inclusive): -9 c) A random integer between -50 and -20 (inclusive): -31 d) A random float between 0.0 and 21.9999 (inclusive): 19.9048

Separate your code into sections with proper in-line comments such as

// Part a): Generate integer number between 20 and 80 (inclusive)

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!