- Download Simple-Shape-Generator.vpp. You can also find this file at the bottom of this tutorial.
- Open the downloaded .vpp file in Visual Paradigm. To open a project, select Project > Open from the application toolbar. You can see the class diagram below.
- We want to model the fact that class Shape is an API class. We can do this by defining and applying an API stereotype. Select Windows > Configuration > Configure Stereotypes... from the toolbar.
- In the Configure Stereotypes window, expand the tree node Class, and select Class. Click Add... at the bottom.
- In the stereotype specification, enter API as name.
- Here you can see three options in the specification dialog box. They are Fill, Line and Font. By setting them, you can make classes that extend the API stereotype share the formatting properties defined. Let's try Fill first. Check Use for Fill. Click on the ... button. Select gray as color.
- Similar, check Use for Line and edit its properties. Select a style of dotted line, set 3 as weight, blue as color.
- Finally, check Use for Font and edit its properties. Select a font you like (Comic Sans MS is used in this tutorial), set bold, and select 14 as font size, which makes the text bigger than default.
- Click OK to confirm the changes in Stereotype Specification. Click OK in Configure Stereotype dialog box to close it.
- Now, we need to make the class Shape extend the API stereotype. Right-click on the class Shape and select Stereotypes > API from the popup menu.
- The appearance of class is updated to follow that defined for the stereotype API.