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
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
Get step-by-step solutions from verified subject matter experts
