1 Attachment(s)
Polymorphism Array Validation Help
Hi all,
I am sort of stuck with a problem i face within a program that i am creating for a uni assignment see attached:
Outline of program is that i have a Person class, Student, Lecturer, Module and Clerical classes. I am using a polymorphic array and for the students, lecturers and clerical staff and input is just provided from the console.
Problem i face is when i am assigning modules to both the students and lecturers i first search the person array to see if the student, lecturer exists and then assign a module but if i perform the search and a clerical person exits i want to prevent the user from assigning modules to a clerical person.
I dont really have much of a clue on how to implement this and any help would be great!
Cheers