* Classify the city based on its population. * @param cityPopulation Number of people in the city. * @return City classification. * @todo Put people counts into a table. */
| 198 | * @todo Put people counts into a table. |
| 199 | */ |
| 200 | CityClass Micropolis::getCityClass(Quad cityPopulation) |
| 201 | { |
| 202 | CityClass cityClassification = CC_VILLAGE; |
| 203 | |
| 204 | if (cityPopulation > 2000) { |
| 205 | cityClassification = CC_TOWN; |
| 206 | } |
| 207 | if (cityPopulation > 10000) { |
| 208 | cityClassification = CC_CITY; |
| 209 | } |
| 210 | if (cityPopulation > 50000) { |
| 211 | cityClassification = CC_CAPITAL; |
| 212 | } |
| 213 | if (cityPopulation > 100000) { |
| 214 | cityClassification = CC_METROPOLIS; |
| 215 | } |
| 216 | if (cityPopulation > 500000) { |
| 217 | cityClassification = CC_MEGALOPOLIS; |
| 218 | } |
| 219 | |
| 220 | return cityClassification; |
| 221 | } |
| 222 | |
| 223 | /** |
| 224 | * Evaluate problems of the city, take votes, and decide which are the most |
nothing calls this directly
no outgoing calls
no test coverage detected