Top Banner
Introduction to Software Engineering (CS350) Korea Advanced Institute of Science and Technology 3/10/2010 StarUML User Guide
22
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture StarUML

Introduction to Software Engineering (CS350)

Korea Advanced Institute of Science and Technology3/10/2010

StarUML User Guide

Page 2: Lecture StarUML

Introduction to Software Engineering (CS350)

Contents

StarUML Overview

Basics of StarUML

Use Case Diagram

Activity Diagram

State Diagram

Sequence Diagram

3/10/2010

2

Copyright (c) Korea Advanced Institute of Science and Technology

Page 3: Lecture StarUML

Introduction to Software Engineering (CS350)

StarUML Overview

What is StarUML? A software modeling platform that supports UML (Unified

Modeling Language) Based on UML 1.4 Provides UML 2.0 notation

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

Key Features Accurate UML standard model Open software model format True MDA(Model Driven Architecture) support Useful Add-Ins

3/10/2010

3

Copyright (c) Korea Advanced Institute of Science and Technology

Page 4: Lecture StarUML

Introduction to Software Engineering (CS350)

Basics of StarUML (1/6)

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

3/10/2010

4

Copyright (c) Korea Advanced Institute of Science and Technology

Page 5: Lecture StarUML

Introduction to Software Engineering (CS350)

Basics of StarUML (2/6)

Add New Model

3/10/2010

5

Copyright (c) Korea Advanced Institute of Science and Technology

Page 6: Lecture StarUML

Introduction to Software Engineering (CS350)

Basics of StarUML (3/6)

Add New Diagram

3/10/2010

6

Copyright (c) Korea Advanced Institute of Science and Technology

Page 7: Lecture StarUML

Introduction to Software Engineering (CS350)

Basics of StarUML (4/6)

Whole view of StarUML and Add Elements of Diagram

3/10/2010

7

Copyright (c) Korea Advanced Institute of Science and Technology

Menu Bar

Toolbox Panel

Diagram Area

Model Explorer

Properties

Message Window

Page 8: Lecture StarUML

Introduction to Software Engineering (CS350)

Basics of StarUML (5/6)

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

3/10/2010

8

Copyright (c) Korea Advanced Institute of Science and Technology

Page 9: Lecture StarUML

Introduction to Software Engineering (CS350)

Basics of StarUML (6/6)

Copy/Paste for Different Diagram Types

3/10/2010

9

Copyright (c) Korea Advanced Institute of Science and Technology

Diagram Type Copy/Paste

Class DiagramElements can be copied or pasted freely between Class, UseCase, Component,

CompositeStructure, and Deployment diagrams.

UseCase DiagramElements can be copied or pasted freely between Class, UseCase, Component,

CompositeStructure, and Deployment diagrams.

Sequence Diagrams Elements cannot be copied or pasted

Collaboration Diagrams Elements cannot be copied or pasted

Statechart Diagram Elements can be copied or pasted only between diagrams within the same StateMachine

Activity DiagramElements can be copied or pasted only between diagrams within the same

ActivityGraph

Component DiagramElements can be copied or pasted freely between Class, UseCase, Component,

CompositeStructure, and Deployment diagrams

Deployment DiagramElements can be copied or pasted freely between Class, UseCase, Component,

CompositeStructure, and Deployment diagrams

CompositeStructure

Diagram

Elements can be copied or pasted freely between Class, UseCase, Component,

CompositeStructure, and Deployment diagrams

Page 10: Lecture StarUML

Introduction to Software Engineering (CS350)

Use Case Diagram (1/2)

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 Actor System Boundary

Elements of Use Case Diagram Actor, UseCase, Association, Directed Association, Generalization,

Dependency, Include, Extend, System Boundary, Package

3/10/2010

10

Copyright (c) Korea Advanced Institute of Science and Technology

Use Case

Actor

Actor System

Page 11: Lecture StarUML

Introduction to Software Engineering (CS350)

Use Case Diagram (2/2)

3/10/2010

11

Copyright (c) Korea Advanced Institute of Science and Technology

System

Homeowner

Configure SafeHome system parameters

Access camera surveillance via the Internet

Set alarm

Cameras

SafeHome

Preliminary use-case diagram for the SafeHome system

(Figure 6.4)

Page 12: Lecture StarUML

Introduction to Software Engineering (CS350)

Activity Diagram (1/2)

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 Condition

Elements of Activity Diagram ActionState, SubactivityState, InitialState, FinalState,

Synchronization, Decision, Flow Final, Object Flow, Signal Accept State, Signal Send State, Transition, SelfTransition, Swimlane

3/10/2010

12

Copyright (c) Korea Advanced Institute of Science and Technology

Activity

Action1 Action2

Invalid passwords/IDValid passwords/ID

Page 13: Lecture StarUML

Introduction to Software Engineering (CS350)

Activity Diagram (2/2)

3/10/2010

13

Copyright (c) Korea Advanced Institute of Science and Technology

Enter password and user ID

Select major function Prompt for reentry

Select surveillance

Select specific camera - thumbnails Select camera icon

View camera output in labeled window

Prompt for another view

Exit this functionSee another camera

Thumbnail views

Select a specific camera

No input tries remain

Input tries remain

Invalid passwords/IDValid passwords/ID

Activity diagram for Access camera surveillance

via the Internet display camera views function

(Figure 6.5)

Page 14: Lecture StarUML

Introduction to Software Engineering (CS350)

Class Diagram (1/2)

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

3/10/2010

14

Copyright (c) Korea Advanced Institute of Science and Technology

name

+Attribute1#Attribute2-Attribute3

+Operation1()~Operation2()

+ : public

# : protected

- : private

~ : package

Page 15: Lecture StarUML

Introduction to Software Engineering (CS350)

Class Diagram (2/3)

Notions of Relationship between class Association

Aggregation

Composition

Dependency

Elements of Class Diagram Subsystem, Package, Class, Interface, Enumeration, Signal,

Exception, Port, Part, Association, DirectedAssociation, Aggregation, Composition, Generalization, Dependency, Realization, AssociationClass, Connector, Object, Link

3/10/2010

15

Copyright (c) Korea Advanced Institute of Science and Technology

Company Person+employee+employer

1..**

Company Department1 *

Window Frame1 *

FlimClip

+Name

+playOn()

Channel

Page 16: Lecture StarUML

Introduction to Software Engineering (CS350)

Class Diagram (2/3)

3/10/2010

16

Copyright (c) Korea Advanced Institute of Science and Technology

FloorPlan

+type+name+outsideDimensions

+determineType()+positionFloorplan()+Scale()+change color()

Camera

+type+ID+location+fieldView+panAngle+ZoomSetting

+determineType()+translateLocation()+displayID()+displayView()+displayZoom()

Wall

+type+WallDimensions

+determineType()()+Operation1computeDimensions()

WallSegment

+type+startCoordinates+stopCoordinates+nextWallSement

+determineType()+draw()

Window

+type+startCoordinates+stopCoordinates+nextWindow

+determineType()+draw()

Door

+type+startCoordinates+stopCoordinates+nextDoor

+determineType()+draw()

Composition

Aggregation

Class diagram for FloorPlan

(Figure 6.10)

Page 17: Lecture StarUML

Introduction to Software Engineering (CS350)

State Diagram (1/2)

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

Elements of State Diagram State,SubmachineState, InitialState, FinalState, JunctionPoint,

ChoicePoint, ShallowHistory, DeepHistory, Synchronization, Flow Final, Transition,SelfTransition

3/10/2010

17

Copyright (c) Korea Advanced Institute of Science and Technology

State1 State2Event/Action

State1

entry/EntryAction1do/DoAction1exit/ExitAction1

Page 18: Lecture StarUML

Introduction to Software Engineering (CS350)

State Diagram (2/2)

3/10/2010

18

Copyright (c) Korea Advanced Institute of Science and Technology

Resetting

entry/set systemStatus "inactive"entry/set displayMsg1 "Starting system"entry/set displayMsg2 "Please wait"entry/set displayStatus slowBlinkingdo/run diagnostics

Idle

entry/set systemStatus "inactive"entry/set displayMsg1 "Ready"entry/set displayMsg2 ""entry/set displayStatus steadydo/handleKeyexit/powerOff

MonitoringSystemStatus

entry/set systemStatus "monitoring"entry/set displayMsg1 "Armed"entry/set displayMsg2 ""entry/set displayStatus steadydo/monitorAndControlSystemdo/handleKey

ActionOnAlarm

entry/set systemStatus "monitorAndAlarm"entry/set displayMsg1 "ALARM"entry/set displayMsg2 triggeringSensorentry/set displayStatus fastBlinkingdo/monitorAndControlSystemdo/soundAlarmdo/notifyAlarmRespondersdo/handleKey

off/powerOff

sensorTriggered/restartTimer

failureDetected/set displayMsg2 "contact Vendor"

Start/stop switch power "on"

systemOk

Reset

Activate

deactivatePassword

falseAlarm

timeOut

sensorTriggered/startTimer

deactivatePassword

State diagram for SafeHome security function

(Figure 7.4)

Page 19: Lecture StarUML

Introduction to Software Engineering (CS350)

Sequence Diagram (1/2)

Sequence Diagram The type of behavioral representation indicates how events cause

transitions from object to object

Notation of Sequence Diagram Object/Life Line/Activation Flow of control

Elements of Sequence Diagram Object, Stimulus, SelfStimulus, Combined Fragment, Interaction

Operand, FrameSubsytem

3/10/2010

19

Copyright (c) Korea Advanced Institute of Science and Technology

Object Object1 Object2

4 : Call()

5 : Send

7 : SelfStimulus()

9 : Return

Page 20: Lecture StarUML

Introduction to Software Engineering (CS350)

Sequence Diagram (2/2)

3/10/2010

20

Copyright (c) Korea Advanced Institute of Science and Technology

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

Page 21: Lecture StarUML

Introduction to Software Engineering (CS350)

References

[1] StarUML 5.0 User Guide, http://staruml.sourceforge.net/docs/user-guide(en)/toc.html

[2] StarUML Tutorial, http://cnx.org/content/m15092/latest/

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

3/10/2010

21

Copyright (c) Korea Advanced Institute of Science and Technology

Page 22: Lecture StarUML

Questions?

3/10/2010

22

Korea Advanced Institute of Science and Technology