TreeMap Update Tutorial

From Progzoo
Jump to: navigation, search

In this tutorial we play Megalomania with the countries of South America.

One million more for Brazil!

The sample code changes the population of Peru.

Add one million to the population of Brazil.

[Font] [Default] [Show] [Resize] [History] [Profile]

Move Venezuela to North America

Change the region of Venezuela to "North America". It will no longer show up in the list.

[Font] [Default] [Show] [Resize] [History] [Profile]

Move United Kingdom to South America

Change the region of "United Kingdom" to "South America". It might improve the weather.

[Font] [Default] [Show] [Resize] [History] [Profile]

Remove Suriname

Use the remove method to destroy Suriname. [The answer doesn't have Suriname removed, please fix].

[Font] [Default] [Show] [Resize] [History] [Profile]

Rio de Janeiro becomes independent

Rio de Janeiro has:

  • area 43000
  • pop 15500000
  • gdp 24693600000

Create a new country called "Rio de Janeiro" and give it the figures shown above. Don't forget to take these off Brazil.


[Font] [Default] [Show] [Resize] [History] [Profile]

Chile Takes Brazil

Chile takes over Brazil! Add the area, population and gdp of Brazil into Chile, remove Brazil.

[Font] [Default] [Show] [Resize] [History] [Profile]