Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

CPS125 - Term Project – Winter 2020 This project is a team project. It must be done in teams of two, three, or four people (preferably three). Teammates must be from the same professor's class (not...

1 answer below »
CPS125 - Term Project – Winter 2020

This project is a team project. It must be done in teams of two, three, or four people (preferably three).
Teammates must be from the same professor's class (not necessarily the same lab section).
Students working alone and teams that have members from different professors will have their
submissions refused.
UPDATE
Students working alone now accepted
On this project you will make calculations and conclusions based on real data collected by the NOAA (The
National Oceanic and Atmospheric Administration, an agency of the United States government) on the “Daily
Lake Average Surface Water Temperature” of six lakes (Ontario, Erie, Huron, Michigan, Superior, and St.
Clair) during the 2019 calendar year.
You can find the actual data file here that contain the average temperatures for each day of the year for each
of the six lakes. Data were collected between January and December 2019 and are in degrees Celsius.
https:
coastwatch.glerl.noaa.gov/ftp/glsea/avgtemps/2019/glsea-temps2019_1024.dat
Days are numbered 1 to 365, 1 being January 1st and December 31st being 365.
You must use the C program to read the file and put the data into a
ays. Download the file and clean it up to
make it compatible – simply remove all lines above
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
Do not enter data by hand!
HINT > Have a loop that goes from 1 to 365 and fill one a
ay per lake (one cell per iteration). The cell
number will act as the day of the year (just leave cell 0 unused).
Required elements:
Each required element should have its own program (.c) file although one program with separate
helper functions is also an excellent implementation.
All computations to be done in C using the imported data file.
1. Calculate the yearly average temperature for each of the lakes, and the yearly average for all six lakes
put together.
2. Indicate which lake is the coldest and which one is the warmest, based on the average yearly
temperatures calculated in step #1. Also indicate which lakes have average temperatures above the
average of all the lakes and which ones are below that same average.
3. Indicate the day and the temperature for the warmest water temperatures for each of the lakes. Do
the same for the coldest temperatures. You must convert the day of the year value into a date/month
format.
4. Indicate the day, lake and temperature of the warmest water temperature overall (all lakes
combined). You must convert the day of the year value into a date/month format and indicate which
lake. Do the same for the coldest temperature.
5. Calculate the summer average (day 172 to day 265) for all 6 lakes (one average per lake). Display
the names of the lakes in order from warmest to coldest. Is the order from warmest to coldest the
same as with the yearly average calculated in step #2?
6. Calculate the winter average (days 1 to 79 and days 355 to 365) for all 6 lakes (one average per
lake). Display the names of the lakes in order from warmest to coldest. Is the order from warmest
to coldest the same as with the yearly average calculated in step #2?
7. Assuming that you can swim comfortably in the lake if the temperature is above 20 degrees. Calculate
the number of days in the year you can swim for each of the 6 lakes.
https:
coastwatch.glerl.noaa.gov/ftp/glsea/avgtemps/2019/glsea-temps2019_1024.dat
8. Assuming that lakes freeze when the water falls below 0 degrees. Calculate the number of days in
the year that the lake is frozen.
9. Re-do question 1 (the 7 yearly averages) but with data from 2018 instead. Make a table of the
averages side by side to illustrate the two yearly results. Any notable changes between 2018 and
2019? The data file for 2018 is here: https:
coastwatch.glerl.noaa.gov/ftp/glsea/avgtemps/2018/glsea-
temps2018_1024.dat
Important Notes:
I. All computations are to be done with C only. No hand computations are permitted.
II. You are to write a report. Your report must have an introduction about the purpose of the report and its
presentation. Present also all team members and specify who did what if applicable.
III. The report must be detailed, well presented and attractive. Don't be afraid to use colors to emphasize
parts of the report. Be creative in the use of tables and images. Points will be awarded to the exactness of
the computations, appearance, ease of reading (use font sizes that are easy to read and use adequate line
spacing and margins), and the quality of the English language. Length of the report should be approximately
etween 3 and 7 pages (excluding C codes in the appendix). The report consists of the answers provided by
each of the program requirements and a short sentence explaining why the results make sense. Be original!
Plagiarism will be dealt with severely to the full extent of Ryerson academic integrity regulations. The report
and programs will be submitted to a plagiarism detection system and non-original submissions will incur an
extra 5% penalty on the final grade (in addition to the 0/10 mark which will be assigned for a non-original
assignment) as per CMF and Ryerson policy #60.
IV. Your report must have a conclusion about your experience doing this project and how you would do things
differently if you had to do this again.
VI. Finally, as an appendix (a few pages at the end of the report), print out the codes of all your C programs
(.c files). Your report must be submitted in PDF format (you can write it using Microsoft Word or
OpenOffice/Li
eOffice/NeoOffice Writer and export to PDF at the end).
Submission:
1. Project reports are to be submitted in PDF format on D2L/Brightspace. Only one submission per team. Do
not submit duplicates! Teammates must be clearly identified as per point II in the important notes above.
2. Project must be submitted on or before April 3, 2020 @ 20:00 EDT. Late assignments will not be accepted
for marking. If you are concerned about getting the assignment in on time, submit it early. Technical excuses
will not be accepted.

Las updated on March 5, 2020 – 11:35 EST
https:
coastwatch.glerl.noaa.gov/ftp/glsea/avgtemps/2018/glsea-temps2018_1024.dat
https:
coastwatch.glerl.noaa.gov/ftp/glsea/avgtemps/2018/glsea-temps2018_1024.dat

XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXX2
Answered Same Day Apr 09, 2021

Solution

Aditya answered on Apr 10 2021
160 Votes
#include #include #include int max_index(float *a, int n)
{
if(n <= 0)
return -1;
int i, max_i = 0;
float max = a[0];
for(i = 1; i < n; ++i)
{
if(a[i] > max)
{
max = a[i];
max_i = i;
}
}
return max_i;
}
int min_index(float *a,int n)
{
if(n <= 0)
return -1;
int i, min_i = 0;
float min = a[0];
for(i = 1; i < n; ++i)
{
if(a[i] < min)
{
min = a[i];
min_i = i;
}
}
return min_i;
}
void getdate(int i)
{
int a = i ;
if(i<=31)
{
printf(" %d/1 \n",i);
}
else if((i>31) && (i<=59) )
{
i = i-31;
printf(" %d/2 \n",i);
}
else if((i>59) && (i<=90) )
{
i = i-59;
printf(" %d/3 \n",i);
}
else if((i>90) && (i<=120) )
{
i = i-90;
printf(" %d/4 \n",i);
}
else if((i>120) && (i<=151) )
{
i = i-120;
printf(" %d/5 \n",i);
}
else if((i>151) && (i<=181) )
{
i = i-151;
printf(" %d/6 \n",i);
}
else if((i>181) && (i<=212) )
{
i = i-181;
printf(" %d/7 \n",i);
}
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here