Author Topic: How Do You Put Business Rules in a Class Diagram?  (Read 5761 times)

0 Members and 1 Guest are viewing this topic.

hash

  • Newbie
  • *
  • Posts: 1
How Do You Put Business Rules in a Class Diagram?
« on: November 23, 2008, 05:21:04 PM »
Hi there,

In the  attachment shows an image of two classes Item ansd Ledger.

Buiness rule say that :
1. "Ledger" can have maximum of 12 "Item" objects
2. In each "Item" object in the "Ledger" there can be maximum of 20 of the same item (Cosnider items such as Books Bikes, Keys, ....if i cosnider an item: Bike, there can be maximum of 100 Bikes....)

Item(max 12 Items)      orders per Item(MAX 100)
Bike                                    4
Books                                  12
Keys                                    100
........
Pen(12th item)                       34


Q:
1. What kind of relationship is this? (the composition that i have put is correct?)
2. How do i put those business rules into a class diagram (we can use only Item class and the Ledger class)

cheers
« Last Edit: November 24, 2008, 04:36:46 AM by Visio Guy »