oop - Objects identification and their relationships -


i'm trying oop homework, having problems identification of objects. problem says:

a country has provinces, capital city, limit other countries , located on continent. provinces of country bordering other provinces of same country , may limit other countries. provinces have cities , 1 of them capital.

i think objects are:

  • continent
  • country
  • province
  • city

but these objects are territories, , city can capital or not. so, in case:

  • territory
  • continent (extends territory)
  • country (extends territory)
  • province (extends territory)
  • city (extends territory)
  • capitalcity (extends city)
  • commoncity (extends city)

so,

a contienent has collection of country. country has collection of province , capitalcity. province has collection of city , capitalcity.

this done or should ignore territory, capitalcity , commoncity?


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -