Reputation: 20150
Can someone check my class diagram because I am not too good at drawing this type of uml diagram
Upvotes: 0
Views: 2084
Reputation: 18570
I largely agree with previous respondent, so I will present only differences and additional opinions.
To be a bit more precise, "Can create..." should be depicted using dependency relationship (not uses).
6.-9. So no Auction or Item object can exist. Either loosen the relationship in one way and use composition or merge those two to one class or create an association class.
Maybe one category can contain many subcategories? If true, edit the corresponding multiplicity.
Same as 4., view the other answer.
Also rethink the amount of classes in your design. Classes are not just data holders, they should have behaviour. What will be the behaviour of AttributeOption or Attribute or BusinessContact etc? Getters and setters do not count for a behaviour... I guess you planned to have all of this behaviour in BidingService, so I advise you to remove it and split those methods according to what class of objects should be responsible for behaviour achieved through the respective method.
Upvotes: 1
Reputation: 31655
At first glance, you used a lot of aggregations. This is quite uncommon. I have never seen a good example of when an aggregation is justified. It's usually either a plain association (no whole-part relationship) or a composition (the part is deleted when the whole is deleted).
Cannot exists without does not imply aggregation. A proper multiplicity is sufficient. Can create does not imply aggregation. Creation is usually modeled with an appropriately stereotyped use-relation (i.e. dashed arrow), unless an association between the creator and the creation exists (in which case creation need not be mentioned explicitly).
4 But an Auction can be created by only one PersonalUser or only one BusinessUser.
Then the multiplicity of the Auction-PersonalUser association cannot be 1 at the PersonalUser end (because the Auction might have been created by a BusinessUser) and the multiplicity of the Auction-BusinessUser association cannot be 1 at the BusinessUser end (for much the same reason). Use 0..1 as multiplicity, but beware of what I will write about 3.
3 A PersonalUser or BusinessUser can create many Auction
This is equivalent to a User can create many Auction.
6 An Auction can contain only one Item
7 An Item can be in only one Auction
8 An Item cannot exist without an Auction
9 An Auction cannot exist without an Item
Then there is a single association between Item and Auction with multiplicity of 1 at both ends. Don't make aggregations out of it and don't use two associations for it.
13 A Category can has a Parent Category but this is not mandatory
That would be made clear if you label the association ends.
25 A User can create many ForumTopics but a ForumTopic can be created only by one User
This is only vaguely related to Auctions and might as well exists independent of them. Put the Forum stuff into a separate package. Then maybe the auction stuff and the user stuff also deserve a separate packages.
BTW: You did not mention the Bidding Service. It seems solely to model the concept of theses objects do not exist in thin air, they are actually used by some software. In that case, leave it out.
Upvotes: 5