Rainfall

Write a program that stores the total amount of rain for each month in an array. Prompt the user for the values for each month to load the array. Display this information back to them in a nice format with the name of the month and the rainfall for that month. Display back the total rainfall for the year, the average monthly rainfall, the month with the most rain, the month with the least rain, the months with rainfall above average, and the months with rainfall below average. Do not accept negative numbers from the user to be stored in the array.Be sure to test your code with different values and to comment your code completely. Make sure your code is user friendly and the output is formatted nicely.HINT: Break this problem up into pieces. For instance, load the array and display it back out. Get this to work first. Then add the functionality to display the total amount of rain. When that works add the next piece, and so on.Note that this project must be done individually. The program will be checked using a code plagiarism tool against other solutions, so please ensure that all work submitted is your own.You may read and write from the console window.You are to submit your source file, called Rainfall.java in Moodle by the due date.

×
New Download