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
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