Project #6
(Ozone Alerts)
(Due 8 December 2006)
Officials in the city of London have long been concerned with the level of ozone and other air pollutants. Several years ago, they established 22 air quality monitoring stations, one in each of the 22 sections of central London. Each month from April to September, readings are collected from these stations and put into files for computer analysis. The files for 2006 are named Apr06.txt, May06.txt, ... Sep06.txt (each named using the first three letters of the month followed by 06.txt). All six files can be found on the I: drive at I:\jlwolfe\110 The form of each file is the same; each line contains the section's name followed by one ozone reading (in parts per billion) for each day of the month. Here are the first few lines from the Apr06.txt file. Naturally for April, there are 30 readings for each station; so they wrap around in this printout; but they are actually on one line in the file.
Whitechapel 60 41 41 42 80 47
23 11 21 25 41 12 63 16
18 47 97
93 93 50 13 91 69 18
9 31 15 12 42 9
Bermondsey 14 23 35 41 44
8 43 26 56 21 23 15 37
41 6 26 14
27 8 27 69 37 7
11 12 21 5 36 22 33
Walworth 23 31 26 38
26 20 27 17 41 9 19 19
52 30 69 13 48
22 23 26 44 12 8
34 14 62 5 45 7 89
You are to write a program that allows
the person at the keyboard to specify which of the monthly 2006 files to
use and then generates a report file about the readings for the month.
Because this is a government report, the specifications as to how
it works are quite rigid. Your program must do the following things:
Report for the month of Apr
Bad series in Whitechapel from 17 to 19
Bad series in Kennington from 20 to 23
Bad series in Bloomsbury from 24 to 26
Very Unhealthy Days
Section Day(Reading)
Kennington 23(112)
Hoxton
3(119) 30(109)
Clerkenwell 4(116)
Soho
3(109)
Westminster 26(112) 30(107)
Paddington 24(106)
Brompton
5(109) 23(108)
Chelsea
7(106)
Good Days, Low Ozone Levels in ALL Sections
1 2 10 11 12 14
27 28
Generally Unhealthy Days
Day 30, high ozone levels in 5 sections
Highest ozone day was 30 with an average of 47.4091
Your program is required to include at least two functions, other than main. You may choose from among the various tasks what you want to make into a function. I really recommend using more than two functions; but at least two are required.
Approximately three days before the project
is due, I will specify which of the months I want you to create a report
file for. Create a folder named P6 in your folder on
the P: drive for COSC 110, not in the handin folder. Copy
into this folder your program file (the .cpp file named after yourself)
and the report files that I request. Hand in a well documented printout
of your program. You are not required to print the output files.