GregFreeman Posted August 13, 2013 Report Share Posted August 13, 2013 I am doing design and want to show the following in a UML diagram: Method is "GenerateNextX" and it returns class "X." X won't be held in private data, just stuck in a queue to go elsewhere, where it will be immediately consumed. There really is no single object that is holding onto this "X" object. So, where in my UML do I define the "X" class? It seems aggregation and composition don't really fit, so I can't stick it on an existing diagram, as it relates to another class. But, I do want to define the class somewhere. Quote Link to comment
Aristos Queue Posted August 14, 2013 Report Share Posted August 14, 2013 I believe the convention is that you put it hanging out in space on your UML diagram and connect an "instantiates" line from the *method* that creates the instance of the class to your class. A small circle next to the method name with a dotted line from the method to the class. Quote Link to comment
MikaelH Posted August 15, 2013 Report Share Posted August 15, 2013 So the Method "GenerateNextX" belongs a class e.g. "Creator" class is that what you mean? If so the Creator class has a normal Association dependency to the Class "X" This is what Symbio's UML Modeller would show about that design. (select an assoication and press Shift to open the Context Help) Cheers, Mike Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.