Java - Class Hierarchy -
I'm relatively new to programming and one of my classrooms I have to create a class hierarchy for the following things : How do I do this? I think that I understand that I can not expand Thanks for any help! Think about things that are similar country, state, county, The cities are all geographical institutions that can accommodate each other. A river is a geographical unit that can cross human defined boundaries. A limitation is something that helps to describe any of the above. There are some qualities in country, state, county, city and river all. For example, they probably have a name for everyone, they all have bunderies also, that means they should probably share a common base class (perhaps geographical difference). There is a hierarchy in the country, state, county, city, and these are human definitions. You can consider the sub-section of the geographical difference, called PoliticalEntti, which has some things: < Ul> Note that things are not quite simple in real life (there are cities that are cross-county or even the state lines), but to learn the issues of those leads Probably can be ignored. country ,
state ,
county ,
city ,
border And
river .
because it means that there is one thing - a different thing is that the right way to think about it is? Also, I understand that Java has HAS-A relationships but I do not know how to use it, should I create different class files? Or, is there any other way to do this?
Comments
Post a Comment