Highlights
This assignment is built on the first assignment and involves the same functionality as below, with some improvements! The largest changes in A2 are the addition of loops and arrays to store data from multiple locations simultaneously. We are also adding the requirement of using specific functions to complete the assignment, the function prototypes can be found in the .h file included with the “Skeleton Code”.
As this program will build off A1, much of the input/output is the same, however an additional menu option is present: “Enter New Location and Data”. Whenever the user selects this new option, they enter a location name and all three pollutant values. That name and data is stored by your program in an array, whenever an AQHI table is displayed it will include the data for ALL locations previously entered. The user may for example: enter 1 location, print the standard calculation table for 1 location, then enter 3 more locations and print the cool calculation table for the 4 locations. The program will store a maximum of 10 locations.
Please ensure you read all the sections and follow the instructions exactly as we will grade your submission with an auto-grader. You must test your assignment on the SoCS Linux server, and it will be similarly graded on the SoCS Linux server for consistency.
You will receive a 0 if your code includes global variables (variables declared outside of functions), goto statements, or if your code fails to compile without errors. Similarly, the auto-grader will not accept if you name your zip file or program file incorrectly. More details are outlined in Section 4: Program Submission and Administration Information.
Background
In this assignment, you will create an air quality index generator based on values received from the user. The Air Quality Health Index (AQHI) is a scale developed for Canada and used to determine the impact of air quality on health. The scale starts at 1 and goes up to “Above 10” which is for very high-risk conditions. This is illustrated below:
AQHI Equations
To develop this, three pollutants were chosen, and their average concentration values for the last three hours are used to calculate the AQHI. These are ground-level ozone (O3), fine particulate matter (PM2.5) and nitrogen dioxide (NO2). This is calculated using the following equations depending on environmental conditions
Standard Calculation:
AQHI = ( 1000 10.4 ) × [(e 0.000537×o3 − 1) + (e 0.000871×no2 − 1) + (e 0.000487×PM2.5 − 1)]
Cool Conditions (disregards the effect of O3):
AQHI cool = ( 1000 6.43 ) × [(e 0.000457×NO2 − 1) + (e 0.000462×PM2.5 − 1)]
Warm Conditions:
AQHI Warm = ( 1000 12.8 ) × [(e 0.00104×O3 − 1) + (e 0.00101×NO2 − 1) + (e 0.000621×PM2.5 − 1)]
A few things about the calculation:
1. If any pollutant’s average concentration value is unavailable, the AQHI cannot be calculated.
2. The result is rounded off to the nearest positive integer; however, if the calculation is less than 0.5, it is rounded off to 1.
3. The warm vs cold condition is determined by the season: warm season is April–September and cool season is October–March.
This CIS1500 - Engineering has been solved by our PhD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.