Assignment 1

Due Thursday 13th September.
Electronic submission, using the submit command.


You are to write a program that reads a large data file containing compressed meteorological recordings, and answers simple statistical questions asked by the user.

There should be a copy of the data file in your home directories already. In case there isn't, you can see it here: weather.dat.

An explanation of the compressed data format was distributed in class, but if you have lost it, you can see it here: explain.txt.

Your program should be able to answer the following questions, as requested by the user:
  1. Find the average temperature over all days and times.
  2. Find the average temperature over all days and times in a particular month chosen by the user.
  3. Find the average temperature over all days, at a particular time chosen by the user.
  4. Find the windiest time in the records, reporting the date and time.
  5. Print a neat, tidy, nicely readable report of all information available for a particular date and time chosen by the user.
You may use <iostream> or <stdio.h>, whichever you find the more convenient, but be warned, this is one of the many places where <iostream> can let you down by making the work a lot harder than it needs to be.