UNB Faculty of Computer
Science CS3013
Software Engineering II
Lab 1 week of January 22, 2001 to January 26, 2001 Lab
room ITD414
Lab times: Monday, 3:30 to 5:00, Tuesday, 3:30 to 5:00,
Wednesday, 3:30 to 5:00,
Thursday, 7:30 to 9:00 p.m.
Instructions
In this lab, you will practice
using Rational Rose 2000 Enterprise Edition to create UML diagrams and
specifications.
There are seven UML diagrams
attached to this lab handout. You will
learn to recreate them in this lab.
1. Use case
diagram
Draw the Main use case diagram inside Use Case View.
2. Class diagram
Draw the Main class diagram inside Logical View.
3. Sequence diagram
Draw a new sequence diagram named "Course
Registration" inside Logical View.
4. Statechart diagram
Draw a new statechart diagram named "Course Section
State" inside the CourseSection class.
5. Activity diagram
Draw a new activity diagram named "Course Work
Flow" inside Logical View.
6. Component diagram
Draw the Main component diagram inside Component View.
7. Deployment diagram
Draw the Deployment Diagram.
Before you leave the lab, you need to show the lab instructor all the
diagrams you have created, and submit a floppy disk containing the saved
UML model with your name, student number, course name and instructor’s name on
the disk. You should name the UML model
using the following convention:
LastnameFirstnameLab1.mdl
You can get help from the lab instructor anytime during the lab. That is, you don’t have to figure out how to
create the diagrams all by yourself.
The
following are some basic terms and instructions on how to use Rational Rose.
·
Left pane: Browser window
·
Right pane: Work area to draw diagrams
·
To select an item, left-click on the item.
·
To create a new item
- In browser:
Right-click on the item (e.g. Use Case view) under which the new item
will be created -> choose New -> choose the item you want to
create.
- In a diagram:
Drag and drop the corresponding icon from the tool bar to the diagram.
- Use the default
"Main" diagram under each view, or create a new diagram.
- To put an existing
item to the diagram, drag and drop the item from the browser to the
diagram.
- To put a new item in
the diagram, create the item in the diagram using the tool bar.
- To open an item's
specification
- right-click the
item, then choose specification, or
- double left-click on
the item.
- To delete an item
permanently in a diagram,
Left-click on Edit in the menu bar -> choose
Delete from Model
- Hints for drawing diagrams
1. Working on the use case diagram
- To
add a stereotype <<extend>> or <<include>> to an
association line, open the specification of the association, in the
Stereotype entry, select the desired stereotype from the drop-down list or
type-in the stereotype.
2. Working on the class diagram
- To
add an attribute or operation to a class,
- right-click
on the class -> choose New Attribute or New Operation -> enter
name, or
- open
the class’ Specification -> choose Operations or Attributes ->
right-click on blank space in the window -> choose Insert -> enter
the name of the attribute or operation
- To
define data type for an attribute of a class, open the specification of
the class -> choose Attributes -> double-click on the attribute to
open the specification --> type-in the type or select the type from the
drop-down list.
- To
define the signature for an operation of a class, open the specification
of the class -> choose Operations -> double-left-click on the
operation to open the specification -> enter the return type ->
choose Detail -> right-click on blank space in the Arguments window
-> choose Insert -> type-in the argument name -> left-click Type
column of the same row -> type-in the argument’s type or select it from
the drop-down list by left-click again.
- To
add multiplicity to one end of an association line, right-click on that
end of the line -> choose Multiplicity -> choose the desired number
- To
make an association line without arrow, i.e. bi-directional, Right-click
on the end without arrow -> choose Navigable
- To
make an association become aggregation, right-click on the aggregation end
-> choose Aggregate
- To
add a name to an association line, open its specification -> in the
name entry, type-in the name.
3. Working on the sequence diagram
- To
put actor instances and class instances or objects in the sequence
diagram, drag and drop corresponding items from the browser to the diagram
in left-to-right order.
- To
add an object’s name to an object, right-click on the object to add the
name before ":class-name".
- Draw
each message line in top-down order.
- To add operation name to
a message line, right-click on the message line -> choose the operation
-> change each formal parameter to the given actual parameter.
4. Working on the statechart diagram
- To
add event[condition]/action to a transition line, open its specification
-> enter the event name to Event entry -> choose Detail -> enter
the condition and action in the corresponding entries.
- To
add a do/entry/exit action to a state, open its specification -> choose
Action -> right-click on a blank space -> choose Insert ->
double-left-click on the newly inserted type "Entry" to open its
specification -> in When entry, select "On Entry", "On
Exit" or "Do" accordingly.
5. Working on the activity diagram
- To
add an event name to a state transition line, open its specification ->
enter the name to Even entry.
- To
add a name to a state or decision, open its specification -> enter the
name to Name entry.
6. Working on the
component diagram
7. Working on the deployment diagram
- Use
processor nodes
- To
add a name to a connection line, open its specification -> enter the
name to Name entry
- To
add a component to a node, open the node’s specification -> choose
Detail -> right-click blank space in Process window -> choose Insert
-> enter the component name.