-
Notifications
You must be signed in to change notification settings - Fork 0
analysis()
The analysis function takes in a map object pointer and a list object called z_list. The analysis function iterates through each of the list sub objects containing the populations of each region in the map. The function then uses the map pointer to iterate through the object map to get the total pollution. Next the function outputs the totals for each region and the totals pollution. The user is then prompted for a region within the map to return data for. This region is error checked to determine if it is within the maps bounds, and then is incremented through to get the sub totals for the user defined region. These totals are then output to the screen and the user is then asked if they would like to enter another region, and if not the function ends.