I have two classes: student and teacher, the student has one specific method: takeCourse; Teacher has one specific method: teaching.
Now I want to add a new class, GradStudent, which can take a course, such as Student, and can also teach a course, such as Teacher. Which template is the easiest way to implement this new class? Adapter, composite, delegate ....?
Thank.
source
share