How To Create Class Diagram In Rational Rose
Purpose
To represent design subsystems and related artifacts in Rational Rose�98.
Related Rational Unified Process Activities: Architectural Design, Subsystem Design
Overview
The following steps are performed to manage subsystems:
- Creating Subsystems in the Design Model
- Creating Subsystem Interfaces
- Creating Classes within the Subsystem
- Documenting Package and Subsystem Dependencies
- Documenting Subsystem Contents
- Documenting Subsystem Behavior
1. Creating Subsystems in the Design Model
To create a subsystem in the Design Model:
- Create a package in the Design Model, as described in Creating Packages in the Design Model.
- Change the stereotype on the package by right-clicking to select the package. Select "Open Specification".
- In the 'Stereotype' property, enter "subsystem"
In order to show the subsystem in sequence and collaboration diagrams in Rational Rose, a class is created which acts as a "facade" for the subsystem in diagrams. To create this class in the subsystem, follow the steps for creating a class in Tool Mentor- Using Rational Rose to Manage Classes. The "facade" class should have the same name as the subsystem, and should be stereotyped "subsystem" to indicate that it exists as a "facade" or "proxy" for the subsystem.
To identify this class as the "facade" for the subsystem:
- Change the stereotype on the class by right-clicking to select the class. Select "Open Specification".
- In the 'Stereotype' property, enter "subsystem"
- Click "OK"
2. Creating Subsystem Interfaces
See Tool Mentor- Using Rational Rose to Manage Interfaces
To allow the "facade" to provide all the operations provided by the interfaces of the subsystem:
- Right-click on the subsystem package in the browser. Select the New option from the short-cut menu.
- Select Class Diagram from the short-cut menu.
- Enter "Interface Realizations" as the name of the Class Diagram.
- Right click on the diagram and select Open from the short-cut menu.
- Drag-and-drop the "facade" class and the subsystem interfaces onto the diagram.
- Draw generalization associations from the facade class to the interface classes to enable the facade to provide all operations offered by the interfaces.
3. Creating Classes within the Subsystem
To create classes inside the subsystem, see Tool Mentor- Using Rational Rose to Manage Classes.
With the exception of the subsystem "facade" and the subsystem interfaces, all contents of the subsystem should be "invisible" to model elements outside the subsystem. This is done by setting the class export control to "implementation". To do this:
- Right-click on the class in the browser. Select Open Specification from the short-cut menu.
- On the Class Specification, left-click to set the "Implementation" Export Visibility.
- Click "OK".
4. Documenting Package and Subsystem Dependencies
The dependencies between packages/subsystems in the Design Model should be documented as follows:
- Right-click to select the "Design Model" package in the browser and make the short-cut menu visible.
- Select Class Diagram from the New option on the short-cut menu. A new class diagram is added to the browser. Enter "Package/Subsystem Dependencies" as the name of the diagram.
- Double-click on the class diagram in the browser to open the diagram.
- From the browser, left-click to select packages and subsystems, dragging and dropping them onto the diagram. Any existing dependency relationships will automatically be displayed.
- Visually arrange the packages and subsystems into layers on the diagram.
- Annotate the layers using text created with the "Text Box" tool icon.
- Create additional package and subsystem dependency relationships using the "Dependency" tool icon.
5. Documenting Subsystem Contents
Each package and subsystem should contain one or more class diagrams to document and illustrate the classes contained in the package/subsystem. To create a class diagram and insert a class in the diagram, do the following:
- Right-click to select the package/subsystem in the browser and make the short-cut menu visible.
- Select Class Diagram from the New option on the short-cut menu. A "NewDiagram" class diagram is added to the browser.
- While the class diagram is still selected, type the name of the class diagram; name the diagram after the class(es) that it is meant to describe.
- Click to select the class in the browser.
- Drag-and-drop the class(es) onto the class diagram; relationships between classes in the diagram are automatically displayed.
6. Documenting Subsystem Behavior
Each Subsystem should have one or more Sequence Diagrams to illustrate how the operations offered by the interfaces of the subsystem are distributed to the contents of the subsystem.To create a sequence diagram, see Tool Mentor- Using Rational Rose to Manage Sequence Diagrams.
The sequence diagram should illustrate how a particular operation offered by a subsystem interface is performed by model elements contained in the subsystem. The left-most object in these "interface operation" diagrams should be the "facade" class. The remainder of the objects represent the private classes of the subsystem. The messages between them illustrate how the interface operation is realized.
It is recommended that you name the diagram "<interface name>::<operation name>". This naming convention simplifies future tracing of interface behaviors to the classes which implement the interface operations.
How To Create Class Diagram In Rational Rose
Source: http://www.interface.ru/rational/rup51/toolment/rose/tm_dssub.htm
Posted by: carmichaelnower1967.blogspot.com
0 Response to "How To Create Class Diagram In Rational Rose"
Post a Comment