16
1 Using Rational Rose® to construct UML diagrams

1 Using Rational Rose to construct UML diagrams

Embed Size (px)

DESCRIPTION

3 What you should submit In fact, there are various diagrams in UML. Business Use Case diagram Use Case diagram (You must hand in) Activity diagram Sequence diagram (You must hand in) Collaboration diagram Class diagram (You must hand in) Statechart diagram (for important classes) Component diagram (maybe not in this stage) Deployment diagram (maybe not in this stage) Construct them all? It ’ s nice to construct them all, but you don ’ t have enough time … really!

Citation preview

Page 1: 1 Using Rational Rose  to construct UML diagrams

1

Using Rational Rose® to construct UML diagrams

Page 2: 1 Using Rational Rose  to construct UML diagrams

2

User and System requirements User requirements state the functional and non-

functional requirements so they are understandable by system users without detailed technical knowledge.

Hence they are usually written in natural languages. But more detailed system requirements may be

expressed in a more technical way. One widely used technique is to document the

system specification as a set of system models. So that’s the reason why we use UML.

Page 3: 1 Using Rational Rose  to construct UML diagrams

3

What you should submit In fact, there are various diagrams in UML.

Business Use Case diagram Use Case diagram (You must hand in) Activity diagram Sequence diagram (You must hand in) Collaboration diagram Class diagram (You must hand in) Statechart diagram (for important classes) Component diagram (maybe not in this stage) Deployment diagram (maybe not in this stage)

Construct them all? It’s nice to construct them all, but you don’t have

enough time…really!

Page 4: 1 Using Rational Rose  to construct UML diagrams

4

What you should submit At the end of “System requirement stage”, your

“Rose Model file” (.mdl) should contains at least the following diagram:

1. Use case diagram: Use Case diagrams show the interactions between use cases and actors.

Use cases represent system functionality, the requirements of the system from the user's perspective.

Actors represent the people or systems that provide or receive information from the system.

2. Sequence diagrams: Sequence diagrams are used to show the flow of functionality through a use case.

3. Class diagrams: Describes show the static structure of the system being modeled

4. Statechart diagrams(optional): Describes object behaviors.

Do for important classes only.

Page 5: 1 Using Rational Rose  to construct UML diagrams

5

Example: A simple use case diagram

An use case

An actor

Reminder: the information flow is bidirectional; the arrow only indicate who “initiates” the connection.

Page 6: 1 Using Rational Rose  to construct UML diagrams

6

Some other notations in use-case diagram

Page 7: 1 Using Rational Rose  to construct UML diagrams

7

Important things that you should keep in mind in use case diagram

Page 8: 1 Using Rational Rose  to construct UML diagrams

8

Start your Rational Rose

Based on your application development platform, choose your model.(TA: It seems that code generation of Java model requires IBM VisualAge, which is a integrated Java platform by IBM!)

Page 9: 1 Using Rational Rose  to construct UML diagrams

9

A panel with commonly used buttons (actors, use cases, associations)

Construct your use case diagram

ActorUse case

Page 10: 1 Using Rational Rose  to construct UML diagrams

10

Interaction diagrams An interaction diagram shows you,

step−by−step, one of the flows through a use case: what objects are needed for the flow, what messages the objects send to each other, what actor initiates the flow, and what order the messages are sent.

Two types of interaction diagrams are Sequence diagrams and Collaboration diagrams.

So we ask you to hand in only one of them!

Page 11: 1 Using Rational Rose  to construct UML diagrams

11

Example: Sequence diagram

One use case

Page 12: 1 Using Rational Rose  to construct UML diagrams

12

A Collaboration diagram shows the same information, but is organized differently. Although a Sequence diagram and a

Collaboration diagram show you the same information, there are a couple of differences between these two diagrams.

Sequence diagrams can show a focus of control. Collaboration diagrams can show a data flow.

Page 13: 1 Using Rational Rose  to construct UML diagrams

13

Instructions in manipulating sequence diagram To create an actor object on a sequence

diagram:1. Open the sequence diagram.

Browse interaction diagram (You may create a new sequence diagram or open an existing one)

2. Select the actor in the browser (on the left panel).3. Drag the actor from the browser to the open diagram.

To remove an actor object from a sequence diagram:

1. Select the actor on the Interaction diagram.2. Select Edit Delete from Model, or press Ctrl+D.

Note Deleting an actor from the diagram does not delete the actor from the model.

Page 14: 1 Using Rational Rose  to construct UML diagrams

14

Illustration of constructing sequence diagram

Drag and drop

Object

Different messages(self-loop, reply..)

(Later you can associate each object with an existing class after class diagram is constructed)

Page 15: 1 Using Rational Rose  to construct UML diagrams

15

After class diagram is constructed, you may add more information For instance, you may relate a object in the

sequence diagram to a class in the class diagram.

Also, you may map a message into an existing operation.

Please check the reference for more details

Page 16: 1 Using Rational Rose  to construct UML diagrams

16

Class diagram (for the concept of OO, please inform yourself)

Control Panels

1. Right click on the class to add attributes and operations

2. Right click to add on sub-diagrams (and choose state-chart diagram) for further describing the behavior of the class