You are on page 1of 22

Introduction to Software Engineering (CS350)

StarUML User Guide

3/10/2010

Korea Advanced Institute of Science and Technology

Contents
2
Introduction to Software Engineering (CS350)

StarUML Overview Basics of StarUML Use Case Diagram Activity Diagram State Diagram Sequence Diagram

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

StarUML Overview
3
Introduction to Software Engineering (CS350)

What is StarUML?

A software modeling platform that supports UML (Unified Modeling Language) An open source project to create UML class diagrams and automatically generate Java stub code The goal is a compelling replacement of commercial UML tools such as RationalRose, Together and so on
Based on UML 1.4 Provides UML 2.0 notation

Key Features

Accurate UML standard model Open software model format True MDA(Model Driven Architecture) support Useful Add-Ins
Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Basics of StarUML (1/6)


4
Introduction to Software Engineering (CS350)

Installation

http://staruml.sourceforge.net/en/ StarUML 5.0 (Windows Installer) Stable 5.0 (21.67MB)

Start

Select New Project By Approach

4+1 View Model Default Approach Rational Approach UML Component Empty Project

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Basics of StarUML (2/6)


5
Introduction to Software Engineering (CS350)

Add New Model

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Basics of StarUML (3/6)


6
Introduction to Software Engineering (CS350)

Add New Diagram

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Basics of StarUML (4/6)


7
Introduction to Software Engineering (CS350)

Whole view of StarUML and Add Elements of Diagram


Menu Bar

Model Explorer

Diagram Area

Toolbox Panel Message Window

Properties

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Basics of StarUML (5/6)


8
Introduction to Software Engineering (CS350)

Working with UML Profiles

Select the [Model] -> [Profiles] menu. the stereotypes, tag definitions and data types defined in the profile can be used in the project

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Basics of StarUML (6/6)


9
Introduction to Software Engineering (CS350)

Copy/Paste for Different Diagram Types


Copy/Paste Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams.

Diagram Type Class Diagram UseCase Diagram Sequence Diagrams Collaboration Diagrams Statechart Diagram Activity Diagram Component Diagram Deployment Diagram CompositeStructure Diagram

Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams.
Elements cannot be copied or pasted Elements cannot be copied or pasted Elements can be copied or pasted only between diagrams within the same StateMachine Elements can be copied or pasted only between diagrams within the same ActivityGraph Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams 3/10/2010

Copyright (c) Korea Advanced Institute of Science and Technology

Use Case Diagram (1/2)


10
Introduction to Software Engineering (CS350)

Use Case

Describes a specific usage scenario in straightforward language from the point of view of a defined actor Diagrammatic representation called Use Case Diagram can facilitate understanding, particularly when the scenario is complex

Notation of Use Case Diagram

Use Case
Use Case

Actor

System Boundary
System

Actor

Actor

Elements of Use Case Diagram

Actor, UseCase, Association, Directed Association, Generalization, Dependency, Include, Extend, System Boundary, Package
Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Use Case Diagram (2/2)


11
Introduction to Software Engineering (CS350)
Preliminary use-case diagram for the SafeHome system (Figure 6.4) SafeHome System

Cameras Access camera surveillance via the Internet

Configure SafeHome system parameters Homeowner

Set alarm

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Activity Diagram (1/2)


12
Introduction to Software Engineering (CS350)

Activity Diagram

Supplements the use case by providing a graphical representation of the flow of interaction within a specific scenario

Notation of Activity Diagram

Initial/FinalState

Decision Activity

Activity
Activity

Condition
Valid passwords/ID Action1 Invalid passwords/ID Action2

Elements of Activity Diagram

ActionState, SubactivityState, InitialState, FinalState, Synchronization, Decision, Flow Final, Object Flow, Signal Accept State, Signal Send State, Transition, SelfTransition, Swimlane
Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Activity Diagram (2/2)


13
Introduction to Software Engineering (CS350)
Activity diagram for Access camera surveillance via the Internet display camera views function (Figure 6.5) Enter password and user ID

Valid passwords/ID Select major function

Invalid passwords/ID Prompt for reentry

Select surveillance No input tries remain

Input tries remain

Thumbnail views Select a specific camera Select specific camera - thumbnails Select camera icon

View camera output in labeled window

Prompt for another view

Exit this function

See another camera

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Class Diagram (1/2)


14
Introduction to Software Engineering (CS350)

Class Diagram

Class-based Modeling Represents the objects, operations, collaborations within the system

Object : It is manipulated in the system Operations : It will be applied to the object Collaborations : It is occurred between the classes

Notation of Class Diagram

Class

name +Attribute1 #Attribute2 -Attribute3 +Operation1() ~Operation2()

+ : public # : protected - : private ~ : package

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Class Diagram (2/3)


15
Introduction to Software Engineering (CS350)

Notions of Relationship between class

Association Aggregation Composition Dependency

Company

+employer *

+employee 1..*
*

Person

Company

Department

Window

Frame

FlimClip +Name +playOn()

Channel

Elements of Class Diagram

Subsystem, Package, Class, Interface, Enumeration, Signal, Exception, Port, Part, Association, DirectedAssociation, Aggregation, Composition, Generalization, Dependency, Realization, AssociationClass, Connector, Object, Link
Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Class Diagram (2/3)


16
FloorPlan +type +name +outsideDimensions +determineType() +positionFloorplan() +Scale() +change color() Composition Class diagram for FloorPlan (Figure 6.10)

Introduction to Software Engineering (CS350)

Camera +type +ID +location +fieldView +panAngle +ZoomSetting +determineType() +translateLocation() +displayID() +displayView() +displayZoom()

Wall +type +WallDimensions +determineType()() +Operation1computeDimensions()

Aggregation

WallSegment +type +startCoordinates +stopCoordinates +nextWallSement +determineType() +draw()

Window +type +startCoordinates +stopCoordinates +nextWindow +determineType() +draw()

Door +type +startCoordinates +stopCoordinates +nextDoor +determineType() +draw()

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

State Diagram (1/2)


17
Introduction to Software Engineering (CS350)

Statechart Diagram A state is a condition during the life of an object or an

interaction during which it satisfies some condition, performs some action, or waits for some event.

Notation of State Diagram

Start/Stop

transition
State

State1

Event/Action

State2

State1 entry/EntryAction1 do/DoAction1 exit/ExitAction1

Elements of State Diagram

State,SubmachineState, InitialState, FinalState, JunctionPoint, ChoicePoint, ShallowHistory, DeepHistory, Synchronization, Flow Final, Transition,SelfTransition
Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

State Diagram (2/2)


18
Introduction to Software Engineering (CS350)
State diagram for SafeHome security function (Figure 7.4) Resetting Start/stop switch power "on" entry/set systemStatus "inactive" entry/set displayMsg1 "Starting system" entry/set displayMsg2 "Please wait" entry/set displayStatus slowBlinking do/run diagnostics systemOk Idle entry/set systemStatus "inactive" entry/set displayMsg1 "Ready" entry/set displayMsg2 "" entry/set displayStatus steady do/handleKey exit/powerOff off/powerOff deactivatePassword

Reset

failureDetected/set displayMsg2 "contact Vendor"

Activate deactivatePassword

ActionOnAlarm MonitoringSystemStatus entry/set systemStatus "monitoring" entry/set displayMsg1 "Armed" entry/set displayMsg2 "" entry/set displayStatus steady do/monitorAndControlSystem do/handleKey falseAlarm entry/set systemStatus "monitorAndAlarm" entry/set displayMsg1 "ALARM" entry/set displayMsg2 triggeringSensor entry/set displayStatus fastBlinking do/monitorAndControlSystem do/soundAlarm do/notifyAlarmResponders do/handleKey

timeOut sensorTriggered/startTimer

sensorTriggered/restartTimer

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Sequence Diagram (1/2)


19
Introduction to Software Engineering (CS350)

Sequence Diagram

The type of behavioral representation indicates how events cause transitions from object to object

Notation of Sequence Diagram

Object/Life Line/Activation
Object

Flow of control
Object1 Object2

4 : Call() 5 : Send

7 : SelfStimulus()

Elements of Sequence Diagram

9 : Return

Object, Stimulus, SelfStimulus, Combined Fragment, Interaction Operand, FrameSubsytem


Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

Sequence Diagram (2/2)


20
Introduction to Software Engineering (CS350)

Homeowner

Control panel

System

Sensors

1 : Password entered() 2 : Request lookup() 3 : Result 4 : Password = correct() 5 : Request activation()

6 : Activation successful 7 : Activation successful

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

References
21
Introduction to Software Engineering (CS350)

[1] StarUML 5.0 User Guide, http://staruml.sourceforge.net/docs/userguide(en)/toc.html [2] StarUML Tutorial, http://cnx.org/content/m15092/latest/

[3] Roger S. Pressman, Software Engineering: A Practitioners Approach, McGraw-Hill, 7th Edition, ISBN-10 : 0073375977 / ISBN-13 : 9780073375977 , Edition, 2009.

Copyright (c) Korea Advanced Institute of Science and Technology

3/10/2010

22

Questions?

Korea Advanced Institute of Science and Technology

3/10/2010

You might also like