SPHERE
Maintaining compiled objects in separate files allows them to be reused without the need for recompilation.
Also, if the code in sphere.cxx changes, only the sphere.o object need be recompiled.
We can create a sphere.o object file with the following command at the prompt:
>CC -c sphere.cxx

This compiles the program sphere.cxx into the object sphere.o.
The file
main.cxx still includes the declaration of the sphere class contained within sphere.h.
The
main.cxx file can be compiled and linked with the following command at the prompt:

>CC -o sphere main.cxx sphere.o

The inclusion of sphere.o at the end of the compilation command indicates that the object should be linked with the main.o object when linking to form the executable sphere.

The execution of the program remains the same:

>sphere
mySphere has radius: 10.0