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.
|show 6 more comments|
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, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
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
|show 5 more comments|
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:
|show 10 more comments|
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.