Case Study: Inheriting Interface and Implementation

Make abstract base class Shape
Figure 5.13: Defining the polymorphic interface for the Shape hierarchy classes.
\includegraphics[scale=0.43]{figures/img10.38.ps}
Figure 5.14: 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 5.15: Point class header file.
\includegraphics[scale=0.43]{figures/img10.41.ps}
\includegraphics[scale=0.43]{figures/img10.42.ps}
Figure 5.16: 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.17: 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 5.18: 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 5.19: 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 5.20: Cylinder class header file.
\includegraphics[scale=0.43]{figures/img10.51.ps}
\includegraphics[scale=0.43]{figures/img10.52.ps}
Figure 5.21: 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 5.22: 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 5.23: 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 5.24: 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 5.25: 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