JMU
logoQuAQI.png
Programming Assignment 9


1 Overview: The Environmental Protection Agency (EPA) has established national air quality standards to protect the public health from the deleterious effects of five pollutants regulated under the Clean Air Act (CAA): ground-level ozone (O3), particular matter (PM) for two different sizes of particulates (PM 2.5 and PM 10), carbon monoxide (CO), sulfur dioxide (SO2), and nitrogen dioxide (NO2). These standards are characterized by an Air Quality Index (AQI) between 0 and 500 (with values below 100 generally being considered healthy).

QuAQI (pronounced "quacky") is a query system for AQI data (that is being developed by WeatherBits as part of their effort to expand their market).

The user provides QuAQI with current values for each of the pollutants. QuAQI uses these values, along with the National Ambient Air Quality Standards, to calculate the index for each pollutant. The maximum index across the different pollutants is then used as the overall AQI (which determines the description and recommendations that are provided to the user).

For example, if provided with data for Harrisonburg, VA of 8.400 4.000 0.025 7.000 7.000 4.000 for CO, NO2, O3, PM 2.5, PM 10, and SO2, respectively, it must display something like the following:

QuAQI-Example.png
2 Getting Started: Before doing anything else, you should create a directory/folder (e.g., named pa9) that will hold all of the files for this assignment.

Next, you must download the following .class files to that directory/folder:

These classes are described in the following documents:

3 Tasks: You must implement and test the following classes:
4 Some Advice: Throughout the semester you have been "forced" to use the process we discussed at the beginning of the semester. First, you had to understand the problem. Second, you had to understand the aspects of Java that were necessary to solve the problem. Third, you had to design an algorithm. Fourth, you had to implement the algorithm. Finally, you had to test the algorithm (and repeat, if necessary).

For this assignment, you are not being "forced" to use this process. However, it is strongly recommended that you do so. First you should read all of the requirements, design documents, and documentation for existing classes. Then, you should solve several examples by hand to make sure you understand the problem. Then, you should design and implement your classes (in the order given above), one method at a time. Then, after implementing each method you should carefully test it (perhaps using jUnit, certainly using the techniques we discussed in lecture). Finally, you should test the complete system. When testing the complete system, start with tests that involve one set of data, but remember to also include tests that have multiple sets of data.

While it might seem like this process will take a long time, it will actually take considerably less time then the "10,000 monkeys at 10,000 keyboards" approach.

Note that, in order to understand the problem and solve some examples by hand, you will need some data that are available from the NAAQS class. So, you may need to create a small main class that retrieves and prints the data you need.

5 Submitting Your Code: You must submit your code using Web-CAT (and the Blackboard attestation process). Note that, unlike past assignments, Web-CAT will only provide general feedback on the input data and the final output. It will not provide information about the behavior of individual classes and/or methods. You should now be able to test and diagnose your code on your own. Indeed, you should fully test your code before ever submitting it using Web-CAT, so this shouldn't be an issue.

To encourage you to test your code, you will only be allowed to submit your code to Web-CAT 10 times. After that, you will receive a grade of 0 for the assignment. So, it is very important that you test your code before you submit it.

6 Grading: You will not receive partial credit on this assignment (even though Web-CAT will provide information about the percentage of the tests and code that are covered). If your code does not work perfectly you will receive a grade of 0.

Also, as discussed above, if you exceed the submission limit you will receive a grade of 0.

Going Further


Copyright 2013