Important characteristics (cont'd - 2)
The organization of the code in
Listing 4 has the following important characteristics (cont'd from
previous slide):
- The second executable statement in the classMain
function uses the address stored in the pointer variable along with
the pointer-to-member operator (->) to invoke the instance
function named doSomething belonging to the Hello02
object.
- All of the significant work done by the program is done
by the function named doSomething and other functions, classes, and
objects that it may call upon to assist in doing that work.
(Although admittedly the amount of work done by this simple
program is minimal.)