Question: WeatherStation ( identifier ) This constructor initializes the internal data for the weather station. The identifier that is provided is the Station ID for this
WeatherStationidentifier This constructor initializes the internal data for the weather station. The identifier that is provided is the Station ID for this weather station ie a unique name Initially, the weather station does not know about any daily summary reports ie all counts and totals are zero
String getId Returns the weather station ID for this weather station.
recordDailyRainmonth rainfall Record the information from one daily summary line in a data file, which adds the rainfall a double to the month an integer from indicating the month of the daily report
int getCountForMonthmonth Returns the number of daily rainfall values that have been recorded for the specified month a number Return zero when no values have been recorded for the specified month.
double getAvgForMonthmonth Returns the average daily rainfall for the specified month a number This is the total rainfall across all reported daily values for that month, divided by the number of daily values that have been recorded for that month. Return if no rainfall amounts have been recorded for the specified month.
int getLowestMonth Returns the number of the month a number indicating the month that had the lowest average rainfall recorded at this station. If multiple months have the same lowest rainfall average, return the earliest one the lowest month number If no rainfall records have been entered for any month, return the earliest month as well
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
