Hi, lately, I have studied a lot of class diagram of different system.
I noticed almost all the time when people model order and product. There is always a lineitem to connect those two. After few hours of thinking, I can not really justify its purpose. It will be great if anyone can help me with this.
Line items make a *lot* of sense with respect to pricing and material management. Imagine mananging inventory / pricing a DESKTOP PC Order . This has probably 10-15 line items which are different products. Line items are not limited to tangible goods, in other words you can also have a discount coupon as a line-item for an Order. Ultimately you want to price your Order based on the cost of its line-items and you also want to keep track of inventory of individual line items(products/spare parts).
Here are some definitions that might help: 1) Line Item: A line item contains information on which product you want to buy (a product ID, for instance), the quantity (how many of that product you want to buy) and price (product price x quantity). Each line item can belong to exactly one order. Each line item is also associated with exactly one product. 2) Order: An order consists of 1 or more line items 3) Product: A product contains information on a particular product including its description, price etc. A product can be associated with multiple line items (zero or more). Hope this helps.
SCEA<br />SCJD<br />SCJP
Joined: Mar 28, 2005
Oh ok. Thanks, now I finally get it. That quantity of attribute of lineitem is really important aspect of using it.