I've an abstract class Area, which is subclassed as Province, Division, District and City.
Now, I need to specify in the City class in which district this city exists. So, I will have an instance of District class inside City class (Composition), so that I could pass id of a specific district to the city and that will be stored in database city tables. But, it doesn't follow the rules of composition. As District-has-City and not the other way.
And another problem is that both classes are use inheritance and composition, which I feel is not right.
I've been trying to solve this on my own for a week by googling and other stuff. But, I'm unable to solve this issue. It's my last hope i guess. How would I solve this? any example?
PS: is this diagram correct? http://prnt.sc/abuam1