2. Assign cities to a country and 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.

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

International organizations
AcronymNameMembers
UNUnited NationsGermany, France, Russia
WHOWorld Health OrganizationGermany, France, Russia
NATONorth Atlantic Treaty OrganizationGermany, France
Countries
NameCitiesInternational organizations
GermanyBerlin, Hamburg, FrankfurtUN, WHO, NATO
FranceMarseille, Lyon, ParisUN, WHO, NATO
RussiaMoscow, NovosibirskUN, WHO
Cities
NameCountry
BerlinGermany
FrankfurtGermany
HamburgGermany
LyonFrance
MarseilleFrance
MoscowRussia
NovosibirskRussia
ParisFrance

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