Question: I need help with this program Write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles.
Write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles. The program should have methods that return the following: 1. total rainfall for the year .the average monthly rainfall Demonstrate the class using a driver program. Here is a sample run: ( enter key) Please enter rainfall form month 1:3.5 Please enter rainfall form month 2:2.9 Please enter rainfall form month 3: 2.2 Please enter rainfall form month 4:1.9 Please enter rainfall form month 5:4.5- Please enter rainfall form month 6: 7.9 Please enter rainfall form month 7:12.6 Please enter rainfall form month 8:9.8 Please enter rainfall form month 9:5H Please enter rainfall form month 10: 3 Please enter rainfall form month 11:3 Please enter rainfall form month 12: 1.5 Total rainfall is: 57.8 Average rainfall is: 4.816666666666667
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
