2. Project 2 - Assigning a capital to a country, as well as members and a headquarter location to an organization

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

  2. a one-to-one association between Country and City assigning exactly one city as the capital of a country,

  3. a one-to-many association between Country and City assigning cities to a country.

Figure 14.2. Three unidirectional associations.

Three unidirectional associations.

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

Table 14.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 14.4. Countries

Name Capital Cities
France Paris Marseille, Lyon, Paris
Germany Berlin Berlin, Hamburg, Frankfurt
Russia Moscow Moscow, Novosibirsk

Table 14.5. Cities

Name
Berlin
Frankfurt
Hamburg
Lyon
Marseille
Moscow
Novosibirsk
Paris

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