Question d’entretien chez Hexacta

Solve a modelling problem with classes (Object Oriented, Software Engineering). The problem was comprised of three classes: Person, Student and Teacher. Studentt and Teacher inherited from Person, but a student could also be a teacher in a college environment, so this create a problem.

Réponse à la question d'entretien

Utilisateur anonyme

8 juin 2016

Create a role class which composes part of the Person class. The Role class would have each and every possible instance of every role (Teacher, Student) that that specific Person instance has.