Objective: Write a Java program that will perform simple analysis on historic sn
ID: 3860327 • Letter: O
Question
Objective: Write a Java program that will perform simple analysis on historic snowfall for Somerset, Kentucky from data stored in arrays.
2. The Assignment
2.1. Specifications
Follow this with the name of the program: guiSnowfall.
Use Good Comments
Think about the problem and decide what type each of the input numbers should be. Also, think about the calculations and decide what type the variables should be that will hold the results of the calculations.
Use camel casing for variable names, and use descriptive variable names. Do not use general variable names like "tax" or "total."
Use a drop-down box loaded with the years array to allow the user to select a year so that the program can look up the monthly snowfall amount for January, February, and March of the selected year.
The screen should display the following:
Below the drop-down box showing the user-selected year, display the snowfall for January, February, and March of that year.
Then display the total snowfall (for the three months) for the selected year.
Display the highest snowfall year of all the years (all three months combined).
Finally, display the average snowfall for all years (average of all three months combined).
Since some of these calculations will not change, regardless of which year the user selects, you have options as to when you will do those calculations. You may decide when to do those calculations.
Write methods for all tasks.
2.2. The Arrays
Copy and paste the arrays below, into your program.
The data will be stored in four arrays, one will contain all of the above years (string data), the remaining three arrays will contain the snowfall data (doubles) for January, February, and March of each of the same years listed in the first array.
Explanation / Answer
#include <stdio.h>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.