Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

representation of dynamically added classes in structural diagrams

  • 14-06-2009 08:07PM
    #1
    Closed Accounts Posts: 5,284 ✭✭✭


    I'm making some diagrams showing the structure of an application I've developed with C#. I'm showing inheritance and composition relationships between classes.

    Say you have a method that adds an instance of a class B to a collection in class A. So class A can contain an instance of class B, but there is no property or field in class A showing this. How would you represent this in a class diagram?

    Hope this is clear.
    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Surely the collection is an array that would represent this dependency?

    Unless I am reading this wrong, it would be an aggregation association? By the way I guessing you doing this with UML2 class diagram


  • Closed Accounts Posts: 5,284 ✭✭✭pwd


    I'm using the class diagram designer in Visual Studio 2008.
    The classes concerned are silverlight. The collections are the contents of canvases etc. They can contain different types (any class that inherits from FrameworkElement as far as I remember).
    I hadn't included the canvases in the models as relations - been trying to keep the diagrams as simple as possible to keep them readable. I think if I include them though I can represent what I want..


Advertisement