Question: In the Protocols lecture, we mainly wrote a medium - sized program that implemented a Polling client ( i . e . , a program

In the Protocols lecture, we mainly wrote a medium-sized program that implemented a Polling client (i.e., a program that can interact with the Polling server, so that a user can see the questions, vote on them, and see the results without knowing the details of how the Polling protocol works).
In polling.py, three of the functions _read_line, _expect_line, and _write_line were marked as protected, while the others were not. In a sentence or two, what would be a good rationale for making these protected? In other words, why would I have written them that way, instead of making them public instead? (Note that I'm asking specifically about these functions, not for a general definition of what public or protected functions are. This isn't about the concept; it's about the application of the concept.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!