Posted by AG on November 27, 2001 at 13:47:03:
This is regarding the Person-Employee-Professor inheritance in the notes. The 'Professor' class has a function setID() which overrides the setID() of Employee. The Professor setID() directly accesses 'ID' which is a private member of Employee. Isn't this illegal - shouldn't 'ID' be protected instead of private in Employee?
Will appreciate any help.
Post a Followup