About question b).
I think the first option is more correct in OO approach.
But, in practice, you must use the first one in a high level
specification.
In low level, it's depend on: i) if you put all those classes in the same
component you can use the first one too,
but ii) if you put them in different components, it is a good practice to
use the second one.
Régis Patrick S. Simão.
Tian WeiJun <[EMAIL PROTECTED]>@rational.com em 09/04/2001 22:26:34
Favor responder para Tian WeiJun <[EMAIL PROTECTED]>
Enviado Por: [EMAIL PROTECTED]
-
Para: rose forum <[EMAIL PROTECTED]>
cc:
Assunto: (ROSE) question about OOAD
Hi
a>
would anyone recommand one or several good books about object-oriented
analyis and design? both in theoretic and practice?
b>
and I have one question:
in our system, there are classes: Order, OrderItem, Product.
one Order has 1 to many OrderItems, each OrderItem has relationship to One
Product.
there are two method to model them:
1) Order: int orderID,Date orderDate, Collection items
OrderItem: int lineNo, int qty, double price, Product product
Product: Int productID, String name, String UOM
2) Order: int orderID,Date orderDate
OrderItem: int orderID, int lineNo, int qty, double price, int productID
Product: Int productID, String name, String UOM
which one is more OO?
c>
are there any theory in OOAD about how to model these kind of relationship?
are there any theory in OOAD just like normalization in RDBMS design?
thanks
Tian WeiJun
[EMAIL PROTECTED]
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************