Chapter 5 Project Project Name: Chpt5_Project Class Name: Chpt5_Project Write a Java program that generates 100 random numbers in the range of 0-100 and counts how many are equal to or greater than a value entered by the user. Inputs: Prompt the user for the value to test against. This value must be between 30 and 70. If the value is out of range then let the user reenter the value until it is with the range. Outputs: The output will be all the number of random numbers equal to or larger than the number input by the user. Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program. Place the algorithm in a Word document. Step 2. Code the program to prompt the user for a value between 30 and 70 (30 < value < 70). The value must the checked to ensure it is in the required range. If the user's value is out of range then they are prompted to reenter until the value is in range. Use a while or do-while loop to keep prompting until the value is within the range. Next, use a for loop to generate 100 random variables between 0 and 100 and compare each random number to the value entered by the user. If value < random number then then increase the count by 1. Lastly, print out the number of times the random number is larger than the value entered by the user. Step 3. Test your program and it should display the number of random numbers greater than or equal to the user input value. Use the test data in the example below by entering 80 first, which is out of range, then enter 50. Note: the number of random variables oreater than 50 wi1l vary because the user
Chapter 5 Project Project Name: Chpt5_Project Class Name: Chpt5_Project Write a Java program that generates 100 random numbers in the range of 0-100 and counts how many are equal to or greater than a value entered by the user. Inputs: Prompt the user for the value to test against. This value must be between 30 and 70. If the value is out of range then let the user reenter the value until it is with the range. Outputs: The output will be all the number of random numbers equal to or larger than the number input by the user. Step 1. Create an algorithm (either flowchart or pseudocode) that you will use to write the program. Place the algorithm in a Word document. Step 2. Code the program to prompt the user for a value between 30 and 70 (30 < value < 70). The value must the checked to ensure it is in the required range. If the user's value is out of range then they are prompted to reenter until the value is in range. Use a while or do-while loop to keep prompting until the value is within the range. Next, use a for loop to generate 100 random variables between 0 and 100 and compare each random number to the value entered by the user. If value < random number then then increase the count by 1. Lastly, print out the number of times the random number is larger than the value entered by the user. Step 3. Test your program and it should display the number of random numbers greater than or equal to the user input value. Use the test data in the example below by entering 80 first, which is out of range, then enter 50. Note: the number of random variables oreater than 50 wi1l vary because the user
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Hi, I need help with this coding problem on eclipse.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY