Extending a C++ application by using the UML visual development tools |
In this tutorial, you use the UML visualization tools to visualize and extend a sample C++ application. The sample application, called Shapes, contains 2-dimensional and 3-dimensional shapes that are represented by classes. Each 2-dimensional class, for example the square class, inherits from the shapes2d class and each 3-dimensional class, for example the sphere class, inherits from the shapes3d class. When you run the application, you are prompted to specify a size and color for the new shape. The new shape information is then displayed in the Console view. In this tutorial, you use the UML visual development tools to view the hierarchy and structure of the C++ Shapes project. You add a new method called getCircumference to both the sphere and circle classes that calculates and displays the circumference of the shape by using the radius. In the final exercise, you use the UML visualization tools to add the cone shape to the project. The cone class inherits from the shapes3d class to represent a cone. Before you begin, you must import the Shapes project from the Samples Gallery. Click See the related sample to open the Samples Gallery to the C++ shapes sample. ![]() |
![]() |
![]() |