Question: Write a program that calculate and classify the rainfall average for 4 weeks. Firstly, read the rainfall rates for each day in the 4 weeks

Write a program that calculate and classify the rainfall average for 4 weeks.

Firstly, read the rainfall rates for each day in the 4 weeks and store them in a 2-dimentional array [4][7].

Write a method getClassification() to get the classification. The method should receive the rainfall average for a week from the main, and print the classification for that week: High, Medium or Low; based on the received average.

Rainfall average

average >= 6

6 > average > 3

average < = 3

Sample Run:

Please enter the rainfall rate for 4 weeks

week#1

6

8

3

4

5

6

7

week#2

2

1

2

3

2

3

5

week#3

3

5

5

7

3

2

6

week#4

4

3

5

6

7

3

2

Classification for each week:

week#1: High (7.57)

week#2: Low (2.57)

week#3: Medium (4.42)

week#4: Medium (4.20)

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!