Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • 2
    " I can't do an association relationship because Person it's a abstract class" - of course you can, it doesn't matter that Person is abstract. The association relationship means that you are associated with the abstract type (your Class2 "sees" only the methods and properties in the Person type, because your person: Person attribute has that type), but you can assign a Person2 instance to the variable (that's what inheritance allows you to do - substitute a derived type where an object of the base class is expected). P.S. your inheritance arrow should go from Person2 to Person. Commented Feb 9, 2021 at 16:03