Defining a design pattern
- Select a class from the diagram toolbar and click it on the diagram
- Name it as Form and enter getFormID, enter and exit as operation
- Right click on Form class and select Stereotypes > Interface from the pop-up menu
- Press Form class's fit size button to adjust its size
- Click on Form's resource icon Realization->Class and drag it to form another class
- Name the newly created class as SubForm
- Right click on SubForm class and select Related Elements > Realize all Interfaces from the pop-up menu
- Right click on SubForm class and Stereotypes > Stereotypes... from the pop-up menu
- Select PTN Cloneable from Stereotypes tab in Class Specification dialog box and click OK
- Select Form class and Subform class with the mouse, right click on Form class and select Define Design Pattern... from the pop-up menu
- Click OK in Define Design Pattern dialog box
Applying a design pattern
- Right click on the diagram background select Utilities > Apply Design Pattern... from the pop-up menu
- Click Yes in Apply Design Pattern dialog box
- Click Generic Webpage Pattern in Design Pattern dialog box, click PLUS button and then clone... from the pop-up menu
- Enter 1 in Input dialog box and click OK
- Click Form class and enter FeedbackForm in Form
- Click SubForm, enter GeneralFeedbackForm in SubForm and enter CustomerFeedbackForm in SubForm 2
- Click OK in Design Pattern dialog box
- Adjust the location of FeedvackForm class, CustomerFeedbackForm class and GeneralFeedbackForm and their connectors