Question: RainFall clss using Array. Write a RainFall class that stores the total rainfall for each of the 12 months into an array of doubles. The
RainFall clss using Array.
Write a RainFall class that stores the total rainfall for each of the 12 months into an array of doubles. The program should have methids that return the following:
- total rainfall for the year
- the average monthly rainfall
- the month with the most rain
- the month with the least rain
Demonstrate the class in a complete program. Input Validation: Do not accept negative numbers for monthly rainfall figures.
Code RainFall class your operation class and RainFallApp as the driver.
Please use Java and use comments to explain. Thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
