I am working on a Java program that takes in information on various locations (could be a continent, country, city or point of interest) and creates a database that can be searched through. Currently I have a Location object class that has the variables for continent name, population, area and then Continent, Country, City and POI objects that extend the Location class. I thought that this would be a viable structure for the program, however POI objects do not have a Continent associated with it or population.
I have a couple questions about my design, any incite on the breakdown of the inheritance model is greatly appreciated.
1) Is the Location class necessary(Does it improve the implementation?
2) If it is, then should the class itself or the methods be abstract?
3) If it isn't could you point me in a good direction of a logical breakdown of the system.
Thank you in advance for any assistance provided.