Jump to content
  • Advertisement
Sign in to follow this  
PolGraphic

UML - How to represent the relation (structure as parameter, not an attribute)

This topic is 2852 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

Hi.
I have a problem - how to show that there is an relation between two classes in such an example.
Class1 can get as an parameter (or returned value) Class2 type. But Class1 does NOT contains any attributes of Class2 type. It just gets/returns it as a parameter (e.g. in function of Class1, we take come attributes from Class2 or pack few variables in new Class2 just before return) - no variable, container etc. of Class2 type exist in Class1.

Here's the illustration to my problem (on that image it looks like there is absolutely no relations between that two classes):

Share this post


Link to post
Share on other sites
Advertisement
Hi there,

I think you could simply indicate that the return type of the function in Class A is Class B, which is enough to describe the relationship between them. If you consider that it is not obvious and noticeable, then you can add a dependency edge from Class A to Class B. Anyway, the main goal of UML graph is to clarify the designs and eliminate the potential misunderstandings.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!