Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about class diagram

 
jack fe
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Caldwell Baxter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you failed part 2?
 
jack fe
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I failed Part two.
 
Caldwell Baxter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rajiv Shr
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic