Skip to content

City and Country

classDiagram
    class City {
        +String name
        +String population
        +String category
        +String capital
    }
    class Country {
        +String nom
        +String nomCourt
        +String indicatfiTelephonique
    }
    City "1..*" --> "1" Country

Represents a city with its characteristics.

  • Multiple cities belong to one country
  • Public properties have getters and setters

Represents a country.

  • Has one or more cities
  • nom: Full country name
  • nomCourt: Short country name
  • indicatfiTelephonique: Phone country code
  • Public properties have getters and setters