TreeMap Update Tutorial
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.
Move Venezuela to North America
Change the region of Venezuela to "North America". It will no longer show up in the list.
Move United Kingdom to South America
Change the region of "United Kingdom" to "South America". It might improve the weather.
Use the remove method to destroy Surinam
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.
Chile Takes Brazil
Chile takes over Brazil! Add the area, population and gdp of Brazil into Chile, remove Brazil.