2. Project 2 - Assigning cities to a country, as well as members to an organization, and vice versa

This project is based on the information design model shown below. The corresponding app from the previous assignments is to be extended by adding the possibility to manage data about international organizations, with countries as members, and about cities, as capitals and headquarter locations. This is achieved by adding corresponding model classes InternationalOrganization and City, and the following unidirectional associations:

  1. a many-to-many association between InternationalOrganization and Country assigning zero or more countries as the members of an international organization, and, inversely, zero or more international organizations to a country,

  2. a one-to-many association between Country and City assigning zero or many cities to a country and, inversely, exactly one country to a city.

Figure 17.2. Three unidirectional associations.

Three unidirectional associations.

You can use the following sample data for testing your app:

Table 17.3. International organizations

Acronym Name Members
UN United Nations Germany, France, Russia
WHO World Health Organization Germany, France, Russia
NATO North Atlantic Treaty Organization Germany, France

Table 17.4. Countries

Name Cities International organizations
Germany Berlin, Hamburg, Frankfurt UN, WHO, NATO
France Marseille, Lyon, Paris UN, WHO, NATO
Russia Moscow, Novosibirsk UN, WHO

Table 17.5. Cities

Name Country
Berlin Germany
Frankfurt Germany
Hamburg Germany
Lyon France
Marseille France
Moscow Russia
Novosibirsk Russia
Paris France

More data about countries can be found at the CIA World Factbook website.