JAVA PROGRAM Chapter 7. PC #1. Rainfall Class 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: • the 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. Main class name: RainFall (no package name)   NOTE, THE MAIN CLASS NAME needs to be  Rainfall as mentioned above AND IT HAS TO PASS ALL THE TEST CASES WHEN I UPLOAD IT TO HYPERGRADE. THANK YOU

icon
Related questions
Question

JAVA PROGRAM

Chapter 7. PC #1. Rainfall Class
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:
• the 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.
Main class name: RainFall (no package name)
 
NOTE, THE MAIN CLASS NAME needs to be  Rainfall as mentioned above AND IT HAS TO PASS ALL THE TEST CASES WHEN I UPLOAD IT TO HYPERGRADE. THANK YOU
 
Enter the rainfall amount for month 1:\n
1.2ENTER
Enter the rainfall amount for month 2:\n
2.3ENTER
Enter the rainfall amount for month 3:\n
3.4ENTER
Enter the rainfall amount for month 4:\n
5.1ENTER
Enter the rainfall amount for month 5:\n
1.7ENTER
Enter the rainfall amount for month 6:\n
6.5ENTER
Enter the rainfall amount for month 7:\n
2.5ENTER
Enter the rainfall amount for month 8:\n
3.3ENTER
Enter the rainfall amount for month 9:\n
1.1ENTER
Enter the rainfall amount for month 10:\n
5.5ENTER
Enter the rainfall amount for month 11:\n
6.6ENTER
Enter the rainfall amount for month 12:\n
6.0ENTER
Maximum rainfall: 6.6\n
Minimum rainfall: 1.1\n
Total rainfall: 45.2\n
Average rainfall: 3.8\n
 
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.