The left-hand side of the illustration shows the declaration and implementation parts of a local class C1. The right-hand side illustrates the structure of the class with the components in their respective visibility areas, and the implementation of the methods.
The public components of the class form the interface between the class and its users. The protected components are an interface to the subclasses of C1. The private components are not visible externally, and are fully encapsulated in the class. The methods in the implementation part have unrestricted access to all components of the class.