I don't understand the difference between protected and private members or methods, as I assumed both will hide the member or the function to access from outside the class.
What is the difference between the protected and the private keywords?
private
- only available to be accessed within the class that defines them.
protected
- accessible in the class that defines them and in other classes which inherit from that class.