This is the instructions to the program and my program I am currently writing. W
ID: 3591533 • Letter: T
Question
This is the instructions to the program and my program I am currently writing. What am I missing to not get my program working properly?
COMP163 Average Day of First Frost Farmers need to harvest their crops early enough to avoid a killing frost. For this assignment you are to write a program that reads a file created with data from the National Climatic Data Center to determine the average first day in the fall that a frost occurs. The file weatherDaily.dat contains several years of Greensboro daily weather data sorted by increasing date. Each line in the file represents one day's weather and contains the values: date of this weather record date of this weather record from 1 to 12 date of this weather record from 1 to 31 amount of precipitation on this day amount of snow that fell on this day year day precipitation snow daily high highest temperature recorded on this day in tenths of a degree Celsius daily low lowest temperature recorded on this day in tenths of a degree Celsius All values are integers. The program only requires the year, month, day and daily low, although your program must read all data values in each line [90 points] Write a program that displays the date of the first autumn frost for each year in the file. We define an autumn frost as any day when the temperature is less than zero degrees Celsius. Fall frosts occur after July. The first day of frost is when the daily low is less than zero and the month is greater than 7. After you find the first day of frost, you need to skip the rest of the days until December 31. You can use a boolean variable to indicate that a frost has already been found a.Explanation / Answer
As per the program requirements shown in the question, the code has to
print the First day of the Frost and should skip the result there after.
The current code shown will print all the values where dailyLow < 0 and
month > 7 for each year and all the data . So it should skip the data till dec 31 for that year.
This skipping part is not shown in the code. The correct thing will be
once you found out the first day of the year , don't process any data where
that year is there, should start considering the data once you get the new year.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.