Your teacher means "violate good practice and instead use evil protected data members in the base class". In other words, your teacher wants you to write bad code. That is, unless there is some information you have left out. I can't read your mind, so I don't know what your code looks like.