Access Functions and Utility Functions

Not all member functions need be made public to serve as part of the interface of the class. The program of Figs. 1-4 demonstarates the notion of a utility function (also called helper function).
Figure 2: SalesPerson class member-function definitions (part 1 of 2)
\includegraphics[scale=0.45]{figures/img40.ps}
\includegraphics[scale=0.45]{figures/img41.ps}
Figure 3: SalesPerson class member-function definitions (part 2 of 2)
\includegraphics[scale=0.45]{figures/img42.ps}
Figure 4: Utility function demonstration
\includegraphics[scale=0.45]{figures/img43.ps}
\includegraphics[scale=0.45]{figures/img44.ps}


2004-07-01