Skip to main content
4 of 4
edited tags
Christophe
  • 82.2k
  • 11
  • 136
  • 202

Inheritance and association relationships in UML

I was creating a class model using inheritance, and have a situation I don't know how to represent.

For this question I built an example diagram in which I have a class Person with some attributes.

I also have a class Class1 that needs to use objects of a new class with Person's attributes plus sex and birthDate attributes, so I create a Person2 class which inherits from Person.

But I also have another class Class2 which needs to use objects with only the Person attributes, not Person2. I can't use an association relationship because Person is an abstract class.

How should I handle this situation?

Example UML diagram labelling the relationship in question

Caeta
  • 177
  • 8