Visual Paradigm Discussion Forum
Advanced Search
Login [ Register ] Username: Password: Log me on automatically each visit I lost my password  
3 Classes question  XML
Forum Index » UML Questions
Author
Message
mano_cz


Joined: 2009/11/08 05:57
Messages: 1
Offline

Hi, iam new at UML and i have a question. I have this uml containing 3 classes . Is this class diagram ok? Is possible that one class inherit from another and aggregate from this class too? My intention is that CLASS B can contain {CLASS A, CLASS B, CLASS C} and will reimplement some methods from CLASS A. I have this relationship implemented in C#, but i want to know if its ok from UML point of view. Thanks for any answers.
d6chung

[Avatar]

Joined: 2009/07/22 11:30
Messages: 51
Location: Honolulu, HI, USA
Offline

[WWW]
mano_cz wrote:My intention is that CLASS B can contain {CLASS A, CLASS B, CLASS C} and will reimplement some methods from CLASS A. I have this relationship implemented in C#, but i want to know if its ok from UML point of view. Thanks for any answers.


Remember that UML is a modelling language so you have some freedom on representing your models. What you have presented is valid. However, I'm not sure if it is representing your idea of "CLASS B can contain {CLASS A, CLASS B, CLASS C}".

I interpret your class diagram in the following way:
  • CLASS A objects are an aggregation of CLASS B objects.
  • CLASS B objects inherit CLASS A.
  • CLASS C objects inherit CLASS A.

  • David Chung
    University of Waterloo Alumnus

    Forum Index » UML Questions
    Go to:   
    Powered by JForum 2.1.8 © JForum Team