Create a new class named E1P1 Create the Main “Stub" through Eclipse. Bob is an economist and he loves data. In fact, he wants you to generate even more data for him. The E-indicator ranges between 100 and 599. Write a program that generates 25 random measurements in that range and create a report as follows. Write a value returning method that determines the category for a specific month. Use variables as appropriate. No magic numbers. Output should be like the following: The category numbers should be as shown in the chart at bottom. E-Indicator Data Category <#> Category <#> Category <#> Category <#> Month 1 ## Month 2 ## Month 3 ## Month 4 ## Include all months 1 through 25 in your output Category <#> Category <#> Month 22 ## Month 23 ## ## Category <#> Category <#> Month 24 Month 25 ## Distribution Summary #%# Category 1 count Category 2 count Category 3 count Category 4 count Category 5 count 100-199 This should show a count of 200-299 ## how many measurements #%# ## ## 300-399 were in each category. 400-499 500-599 Average of all months ###.#

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Please help me with this Java Lab
Create a new class named <youremail>E1P1 Create the Main "“Stub" through Eclipse.
Bob is an economist and he loves data. In fact, he wants you to generate even more data for
him. The E-indicator ranges between 100 and 599. Write a program that generates 25
random measurements in that range and create a report as follows.
Write a value returning method that determines the category for a specific month.
Use variables as appropriate. No magic numbers.
Output should be like the following: The category numbers should be as shown in the chart
at bottom.
E-Indicator Data
##
Category <#>
Category <#>
Month 1
Month 2
##
Category <#>
Category <#>
Month 3
##
Month 4
##
Include all months 1
through 25 in your output
Category <#>
Category <#>
Category <#>
Category <#>
Month 22
##
Month 23
##
##
Month 24
Month 25
##
Distribution Summary
Category 1 count
Category 2 count
Category 3 count
Category 4 count
Category 5 count
100-199
#%#
This should show a count of
200-299
##
how many measurements
##
##
##
300-399
were in each category.
400-499
500-599
Average of all months ###.#
Transcribed Image Text:Create a new class named <youremail>E1P1 Create the Main "“Stub" through Eclipse. Bob is an economist and he loves data. In fact, he wants you to generate even more data for him. The E-indicator ranges between 100 and 599. Write a program that generates 25 random measurements in that range and create a report as follows. Write a value returning method that determines the category for a specific month. Use variables as appropriate. No magic numbers. Output should be like the following: The category numbers should be as shown in the chart at bottom. E-Indicator Data ## Category <#> Category <#> Month 1 Month 2 ## Category <#> Category <#> Month 3 ## Month 4 ## Include all months 1 through 25 in your output Category <#> Category <#> Category <#> Category <#> Month 22 ## Month 23 ## ## Month 24 Month 25 ## Distribution Summary Category 1 count Category 2 count Category 3 count Category 4 count Category 5 count 100-199 #%# This should show a count of 200-299 ## how many measurements ## ## ## 300-399 were in each category. 400-499 500-599 Average of all months ###.#
Expert Solution
Algorithm

Step 1 : Start

Step 2 : Create a method getCategory() which accepts a number and returns it's respective category it belongs to to the main calling method.

Step 3 : In the main method create a for loop and generate 25 random numbers using the random class and storing the in an array of integers.

Step 4 : Add the numbers together for further average calculation.

Step 5 : Incrementing the Category Counter Array according to the number generated using an if else if statement.

Step 6 : Compute the average of all the numbers generated.

Step 7 : Using a for loop print the Month Number ,  E-Indicator Numbers and the category it belongs to by calling the getCategory() method and passing the number.

Step 8 : Print the category distribution by printing the Category Number and the Count of the Numbers in each category.

Step 9 : Print the average of all the randomly generated numbers.

Step 10 : Stop

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 8 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education