Forums Register Login

Attributes: object instance vs object id

+Pie Number of slices to send: Send
A Plane contains a Seat. This association is shown by an arrow from Plane to Seat. How do we show that a Plane contains a Seat? Do we have an attribute of type Seat in Plan class or do we have a int or String type refering to a Seat id? Basically an id will be a primary key of the Seat in DB or some unique value that can be used to get Seat details from the DB.
If Plane class doesn't have an attribute of type Seat, is it still an Association, and not Dependency?
+Pie Number of slices to send: Send
I have noticed in many class diagrams (in books etc) that an attribute representing a Seat is not shown in a class say Plane. For eg. goto the following link:
http://bdn.borland.com/article/0%2C1410%2C31863%2C00.html#classdiagrams
Why doesn't the Customer class have an attribute of type Order??? Or a List/Collection of Orders?
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 684 times.
Similar Threads
Class Diagram -Association & Inheritance
Difference between aggregation, association and composition
Hibernate Association
Association and dependency
Hibernate POJOs -- association or no-association ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:29:27.