Forums Register Login

Attributes and Associations

+Pie Number of slices to send: Send
Nobody seems to be answering to this question, posting again:::::
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?
+Pie Number of slices to send: Send
Sanz,
Order is not shown as an attribute of Customer because it is regarded as 'noise' within the diagram, in the same way as 'get' and 'set' methods are also not shown. An Order attribute within Cusotmer is implied by the association between Customer and Order and therefore does not need to be shown.
Ray
SCJP, SCWCD, SCBCD, SCEA (part 1), IBM-484
+Pie Number of slices to send: Send
Thanks Ramon. I was a bit confused about this. I just found out that this is called Scafolding Code and since the tools can generate them, are not ususally shown in class diagrams.
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 649 times.
Similar Threads
Games
java program as a win NT Service
What is your IDE of choice?
c cpp and corba
Attributes: object instance vs object id
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:20:37.