JustUser
JustUser

Reputation: 91

Composition with inheritance?

my question is if it's possible/right to model something like this:

enter image description here

The problem is that tutorial can't exist without the lecture, BUT they're both very very similar in their attributes and methods, that's why I thought that maybe it could be easier to have an inheritance there. Thanks for the ideas and answers

Upvotes: 0

Views: 69

Answers (1)

Stephen C
Stephen C

Reputation: 719426

That should work just fine. There is nothing wrong with your model .... though it is conventional to draw the diagram with the superclass above the subclasses, not below them as your diagram does.

Upvotes: 1

Related Questions