Reason for Private part os the class definition
Posted on 1997-12-09
Since the the private part of the class is not accessible by the clients, why must its parts be listed within the class definition. I need to answer to my students :WHY MUST I LIST THE PRIVATE PARTS OF THE CLASS SINCE THESE ARE NOT ACCESSIBLE BY THE CLIENTS? I OTHER WORDS, WHY NOT JUST FORGET ABOUT LISTING THEM? -- THE CLIENT DOES NOT NEED THEM ANYWAY. WHY MUST THESE DEFINITIONS MUST APPEAR WITHIN THE CLASS DEFINITION? I am looking for a short explanation and not code examples? I know the definition must be there, what I need to know is WHY?