interfaces in multiple inheritance in java, modelling issue
I have the following scenario:
As you can see, I have two classes that are Lecturers and Students. The
class Teacher Assistants are a mix between Lectures and Students, that is
because they can enrolled into courses, but they can also lecture some
basic topics (without being considered Lecturers). I came with the idea to
model this situation using Interfaces because I will program in in Java.
Is this modelling correct?
So that the TA class will implement the Interface Teaches, which contains
an array of the courses assigned to this student to teach.
But if I model in that way I realize that I am loosing the class Lecturers
at all. How I can model this situation of multiple inheritance, but not
loosing the class Lecturers? I mean if I program Lecturers as an interface
it would not have any methods that I would need further, for example,
calculus of its wage benefits and so on. Any recommendation?
No comments:
Post a Comment