I have created a class hierarchy for an inventory system for a book/magazine. Here's the picture:

Will it do? I know there's no magazine class yet but I was wondering if anyone could suggest a better idea.
|
I have created a class hierarchy for an inventory system for a book/magazine. Here's the picture:
Will it do? I know there's no magazine class yet but I was wondering if anyone could suggest a better idea. |
|||||||||||||||||
|
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.
|
If it's a case of just UML homework, Yannis and Emmad are spot on with regards to technical aspects and you just re-model it with their input. Coming to the functional part, my suggestion would be
Dear John, you must think a bit realistically when it comes to modeling. You can follow this link to get a better understanding. You may just skip the XML part. It would also teach you a few more things |
|||||||||||
|
|
I am not sure if this is a homework or a real system. Anyway, I see that it is missing a lot of things. Models for real applications must be comprehensive and complete. The purpose of the system must be identified so that it can be judged. Any way, several things are not correct with this model. I will list some of them only:
I think you should spend sometime studying modeling. Edit - In response of some questions in comments: I assume that this model is a simple model used for training, so I am simplifying things a lot here. This type of modeling is a "data first" type that is based on a relational view not on an OO view.
Note the following associations to separate classes:
Each of the items marked as (lookup) will have an ID column (auto generated by the database) in their respective calsses. As a result of associatiation with Book class, there will be a Foreign key of that ID. Some references that may help you from Google Books: |
|||||||||||
|
|
In contrast to Emmad, I see a lot of things you don't need. There's no point in developing any kind of UML model until you have specific use cases to drive the modelling. If you just need to do inventory management, then you don't need information about price, or genre, or even author. You need some identifier (ISBN?), the reorder policy, and the source. If you start modeling before collecting use cases, the modelling will take forever. That's not an exaggeration. I once joined an team at an airline that had been modelling for two years (Software through Pictures), somehow imagining that they were going to be able to produce a single model for the entire company. Finally the customer got impatient and wondered when this team was going to deliver some value. So we identified a real problem, and got down to the hard work of producing a working application. For some reason, the modelling team decided to find something else to do. We never did get any value from the two years of modelling. |
|||||||
|