The public, protected, and private sections of a class will be declared in that order (the public section is declared before the protected section which is declared before the private section).


By placing the public section first, everything that is of interest to a user is gathered in the beginning of the class definition. The protected section may be of interest to designers when considering inheriting from the class. The private section contains details that should be of the least general interest.