Case Study: Inheriting Interface and Implementation

Make abstract base class Shape
Figure 1: Defining the polymorphic interface for the Shape hierarchy classes.
\includegraphics[scale=0.43]{figures/img10.38.ps}
Figure 2: Abstract base class Shape header file and Abstract base class Shape.
\includegraphics[scale=0.43]{figures/img10.39.ps}
\includegraphics[scale=0.43]{figures/img10.40.ps}
Figure 3: Point class header file.
\includegraphics[scale=0.43]{figures/img10.41.ps}
\includegraphics[scale=0.43]{figures/img10.42.ps}
Figure 4: Point class implementation file. (part 1 of 2)
\includegraphics[scale=0.43]{figures/img10.43.ps}
\includegraphics[scale=0.43]{figures/img10.44.ps}
Figure 5: Point class implementation file. (part 2 of 2)
\includegraphics[scale=0.43]{figures/img10.45.ps}
\includegraphics[scale=0.43]{figures/img10.46.ps}
Figure 6: Circle class header file and Circle class that inherits from class Point. (part 1 of 2)
\includegraphics[scale=0.43]{figures/img10.47.ps}
\includegraphics[scale=0.43]{figures/img10.48.ps}
Figure 7: Circle class that inherits from class Point. (part 2 of 2)
\includegraphics[scale=0.43]{figures/img10.49.ps}
\includegraphics[scale=0.43]{figures/img10.50.ps}
Figure 8: Cylinder class header file.
\includegraphics[scale=0.43]{figures/img10.51.ps}
\includegraphics[scale=0.43]{figures/img10.52.ps}
Figure 9: Cylinder class implementation file. (part 1 of 2)
\includegraphics[scale=0.43]{figures/img10.53.ps}
\includegraphics[scale=0.43]{figures/img10.54.ps}
Figure 10: Cylinder class implementation file. (part 2 of 2)
\includegraphics[scale=0.43]{figures/img10.55.ps}
\includegraphics[scale=0.43]{figures/img10.56.ps}
Figure 11: Demonstarting polymorphism via a hierarchy headed by an abstract base class. (part 1 of 3)
\includegraphics[scale=0.43]{figures/img10.57.ps}
\includegraphics[scale=0.43]{figures/img10.58.ps}
Figure 12: Demonstarting polymorphism via a hierarchy headed by an abstract base class. (part 2 of 3)
\includegraphics[scale=0.43]{figures/img10.59.ps}
\includegraphics[scale=0.43]{figures/img10.60.ps}
Figure 13: Demonstarting polymorphism via a hierarchy headed by an abstract base class. (part 3 of 3)
\includegraphics[scale=0.43]{figures/img10.61.ps}
\includegraphics[scale=0.43]{figures/img10.62.ps}
2004-07-29