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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started