So I've got this java assignment for college and was just wondering if anyone here could give me some feedback as to what I've been thinking some of this means.
I've got a .csv file with building details - Here is a sample of the data I'll be working with.
Now part of the assignment states -
Entries in the building list can be categorised in at least three ways: by category A, B or C. Each category is associated with the same data as above, but you will be required to handle them differently in your directory. You should formulate a suitable object model for this data, making use of appropriate (abstract) superclasses, and subclasses. (This is an exercise in inheritance, so although the directory is rather simple, you should create an object model with inheritance.)
So I was thinking of going with a Building superclass and then having a Listed Building subclass. I would then have three more subclasses Category A/B/C Buildings inheriting from Listed Building. But I was then thinking of just having Listed Building be the superclass since there will only be one type of building in this assignment. As for the Category classes, they will not contain any new attributes over what Listed already has by the look of it, but one of the tasks states -
Display suitable information for each entry returned, depending on category. Although the information stored for each category is the same, you should present it as follows: items of category A should appear in ALL CAPITALS with all data fields; items of category B should be in lower case with all data fields; items of category C should be in lower case and omit the council and parish. The object model you have created should take care of these differences.
Now when it says the object model should take care of this, would you say it means there should definitely be a Category A/B/C class and that each class should have getters for the data fields that will manipulate the data the way that is described in the task. e.g output in lower case? And for the omitting some fields for Category C, would I just not include a getter for those in the Category C class since they won't be used?
EDIT Class diagram of what I have just now getEntry() is abstract and will be used by the subclasses to put together an appropriate string determined by the task requirements for each different category.