RSM Tutorial - Software Engineering II

advertisement
University of Southern California
Center for Systems and Software Engineering
Rational Software Modeler
Tutorial
Pongtip Aroonvatanaporn
University of Southern California
Center for Systems and Software Engineering
Outline
•
•
•
•
•
•
Setting up RSM environment
Activity Diagram
Use-case Diagram
Class Diagram
Sequence Diagram
Archiving
University of Southern California
Center for Systems and Software Engineering
RSM Environment
• Built on Eclipse environment
– Workspace
– Modeling perspective
• Comes with Eclipse 3.2
• Or installed as Eclipse plug-in
– Note: on Windows 7, use your own version of
Eclipse and JDK/JRE
– Download Eclipse 3.2.2 and latest JDK/JRE
– Choose “Extend Eclipse”
University of Southern California
Center for Systems and Software Engineering
Activity Diagram
• Captures a sequence of activities and
actions
• In CSCI577, used to model business
workflow or business process
University of Southern California
Center for Systems and Software Engineering
Components
•
•
•
•
Partitions
Actions
Control node (i.e. decision node)
Control flow
– Transfer of action
• Object node (i.e. data)
• Object flow
– Transfer of object
University of Southern California
Center for Systems and Software Engineering
Steps
• Create a new model called “Activity Model”
• Right click on the model
– Add Diagram  Activity Diagram
• On the right panel, select the following
–
–
–
–
Partition
Actions
Control node (decision node)
Control flow
University of Southern California
Center for Systems and Software Engineering
Use-Case Diagram
• Captures the interaction between actors
and system
• Shows the possible
capabilities/functionalities the system can
perform
• Association
– Roles and multiplicities do not apply
University of Southern California
Center for Systems and Software Engineering
Components
• Actor
– Show the hierarchy of users
• Use-case
– The actions that user can perform
• Relationships
– Association
– Dependencies
• “Includes”
– invocation of a use case by another one
• “Extends”
– Ultimately an alternate course of action
– Should avoid as it complicates the model
University of Southern California
Center for Systems and Software Engineering
Steps
• Create “System Analysis” model
• Right click on the model
– Add Diagram  Use-case Diagram
• Add an actor
• Add a few use-cases
– Association from actor to use-case
– “Include” relationship from 1 use-case to
another
– Right vs. wrong
– User inheritance (super user)
University of Southern California
Center for Systems and Software Engineering
Class Diagram
• Detailed designs of the classes
• Contains
– Attributes
– Operations
– Relations between classes
University of Southern California
Center for Systems and Software Engineering
Components
• Classes
– Boundary: pages, view
– Controller: logic
– Entity: model, data
• Relationships
– Association: “Has-a”
– Aggregation: “Part-of”
– Composition
• Stronger aggregation
• Lives and dies with parent
University of Southern California
Center for Systems and Software Engineering
Steps
• Create a new model called “Design Model”
• Create a package called “Design Classes”
• Add new classes:
–
–
–
–
–
<<boundary>> VolunteerPage
<<controller>> TimeController
<<entity>> Time
<<entity>> TimeSheet
<<entity>> VolunteerProfile
• Create relationships
– Composition
– Specialization
– Association
University of Southern California
Center for Systems and Software Engineering
Sequence Diagram
• Captures the detailed sequence of
operations when a use-case takes place
• Includes:
–
–
–
–
–
Actors
Components
Classes
Hardware
Software
University of Southern California
Center for Systems and Software Engineering
Steps
• Create a package called “Sequence”
• Right click on the model
– Add diagram  Sequence diagram
• Sequence diagrams are part of
“collaboration”. Each collaboration should
be named according to the use-case
• Different ways of creating “life-line” entity
– Select from existing
– Create new object
– Unspecified (defined later by drag and drop)
University of Southern California
Center for Systems and Software Engineering
Archiving
• Archiving the model to be transferred to
different computers
– Share among team members
– Submission
• Export as a RAS Asset
University of Southern California
Center for Systems and Software Engineering
Steps
1.
2.
3.
4.
Go to File -> Export
Choose RAS -> RAS Asset
Choose the location to save the file
Choose the project to export
–
Make sure that the option “Export as complete
Eclipse project” is checked
University of Southern California
Center for Systems and Software Engineering
Questions?
Download