Forums Register Login

Question about class diagram

+Pie Number of slices to send: Send
I am trying to find the reason how the 15 points are taken off from my class diagram.
I have two questions,
1. do we need to point out the direction(bi or uni) for association or it is not important?
2. If I want to draw the relation for robot, parts, handpart, footpart, bodypart, headpart.
robot and parts should be aggregation or composition relationship?
3. manage session bean and entity bean should be dependency or association relationship?

Thanks.
+Pie Number of slices to send: Send
So you failed part 2?
+Pie Number of slices to send: Send
Yes, I failed Part two.
+Pie Number of slices to send: Send
Based on all I read in here, the secret to a good score for class diagram is to respect the domain model religiously, regardless whether it makes sense to you or not. Did you do that? Pointing out the direction is a far lesser concern.
+Pie Number of slices to send: Send
 

jack fe wrote:
1. do we need to point out the direction(bi or uni) for association or it is not important?


I feel you need to. The direction may be obvious based on which class has an instance of which class, but if you know the association direction at design time, then why not point it out.

jack fe wrote:
2. If I want to draw the relation for robot, parts, handpart, footpart, bodypart, headpart.robot and parts should be aggregation or composition relationship?


Composition is a strong form of aggregation. Composition is used when your constituent classes cannot exist without the parent composite class, and only the parent class is responsible for instantiating them. In my case, I had used composition, when I had to represent different Part Types. Since individual part types needed a parent composite class to tie the part type, part category and part property instance together, I used composition. In your case I think, if the parts only make sense when associated with a robot, then use composition, else use aggregation.

jack fe wrote:
3. manage session bean and entity bean should be dependency or association relationship?


What I have learnt is that dependency is used when you want to pass the instance of your class as a method argument to the method in another class. In case of a managed session bean and entity bean, I think you can show an association relationship.

Having said that, these are small things, and losing 15 marks might not be solely due to this. You can check if
-- You have not discarded any classes from the BDM
-- You have mentioned the multiplicity properly.
-- You are showing other classes at the front end as well to give an end to end picture. Please refer to the Cade/Sheil book.
-- If you feel the need to change anything in BDM, then you should provide a detailed justification in the Design Assumptions section.

Hope this helps.
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1006 times.
Similar Threads
Association or Not
Association in Cade's class diagram
n-ary association
dependency vs association again???
relation between Caretaker and Orignator in Memento pattern UML representation
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:30:11.