Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Shadow Mint

Slightly tricky UML question...

This topic is 6076 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This was bugging me the other day; any one know the answer? Say you have a WindowFactory class, who's sole purpose it to produce Window objects according to it's internal template. After that creation, it never has anything to do with the Window object again. What is the relationship in the class diagram between the two classes? It's like momentary aggregation. I'm not quite sure what it should be represented as. Note: say the Window does not depend on the WindowFactory, and the WindowFactory only depends on the constructor of the Window. Cheers. Edited by - Shadow Mint on November 20, 2001 11:22:33 AM

Share this post


Link to post
Share on other sites
Advertisement
A dotted line, perhaps?

It''s not aggregation because WindowFactory doesn''t own Windows. It just knows about them. The connection is at a class level, not an object level. If you have separate class and object diagrams, this could be clear (although 90% of the rest of the diagrams will be identical...) but you need some sort of ''association'' relationship that isn''t aggregation of any sort. Like when ClassA gets passed ClassB as a parameter - the 2 classes work together, but one doesn''t necessary ''aggregate'' the other.

Share this post


Link to post
Share on other sites
quote:
Original post by Shadow Mint
This was bugging me the other day; any one know the answer?

Say you have a WindowFactory class, who''s sole purpose it to produce Window objects according to it''s internal template.

After that creation, it never has anything to do with the Window object again. What is the relationship in the class diagram between the two classes?

It''s like momentary aggregation. I''m not quite sure what it should be represented as. Note: say the Window does not depend on the WindowFactory, and the WindowFactory only depends on the constructor of the Window.

Cheers.

Edited by - Shadow Mint on November 20, 2001 11:22:33 AM


I think you can use a stereotyped association to represent that.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!