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
Post a Comment