1/21/2010 - - PDF document

1 21 2010
SMART_READER_LITE
LIVE PREVIEW

1/21/2010 - - PDF document

1/21/2010


slide-1
SLIDE 1

1/21/2010 1

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1

  • Bernd Bruegge & Allen H. Dutoit

Object-Oriented Software Engineering: Using UML, Patterns, and Java 2

  • !
  • "
  • !#$#
  • %&
  • %'

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3

  • (
  • (
  • ()*#'
  • #
  • (#+*#
  • ,*'
  • -
  • .
  • /
  • 0#*

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4

  • ,#!
  • 1)#

#2($ 345

  • #!
  • 1

#

  • !
  • 1)##

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5

!"

Year Month Day ChangeDate Button LCDDisplay ,#! ! #! 6#

  • .7#

#$%

  • .7'#

#

  • A stereotype is drawn as a name enclosed by angled double-

quotes (“guillemets”) (<<, >>) and placed before the name of a UML element (class, method, attribute, ….)

  • 899::8

<<Entity>> Year <<Control>> ChangeDate <<Boundary>> Button <<Entitity>> Month <<Entity>> Day <<Boundary>> LCDDisplay ,#! ! #!

slide-2
SLIDE 2

1/21/2010 2

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7

$%%

  • Stereotypes allow you to extend the vocabulary of the

UML so that you can create new model elements, derived from existing ones

  • Examples:
  • Stereotypes can also be used to classify method behavior such

as <<constructor>>, <<getter>> or <<setter>>

  • To indicate the interface of a subsystem or system, one can

use the stereotype <<interface>> (Lecture System Design)

  • Stereotypes can be represented with icons and

graphics:

  • 6#.7

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8

&

  • One can use icons to identify a stereotype
  • When the stereotype is applied to a UML model element, the

icon is displayed beside or above the name ,#! ! #! Year ChangeDate Button ( WatchUser

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9

''

  • ;'#
  • 6#)#
  • 6##)#
  • !#)
  • $<$2<5

9/:,#! <9/:#! 9/:!

  • 8*

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10

()$

  • =))'
  • -*#2/'#5
  • 8>
  • <
  • 6(?6@
  • (>$#

#

  • 0# #

))2! ,#!5

  • 0# #

))2,#= !5

  • 0# 2= #

!5

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11

*

  • The customer enters the store to buy a

toy.

  • It has to be a toy that his daughter

likes and it must cost less than $50.

  • He tries a videogame, which uses a data

glove and a head-mounted display. He likes it.

  • An assistant helps him.
  • The suitability of the game depends on

the age of the child.

  • His daughter is only 3 years old.
  • The assistant recommends another type of

toy, namely the boardgame “Monopoly".

Flow of Events:

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12

  • +,*-

Part of speech Proper noun Improper noun Doing verb being verb having verb modal verb adjective transitive verb intransitive verb UML model component

  • bject

class

  • peration

inheritance aggregation constraint attribute

  • peration

Constraint, class, association Example “Monopoly” Toy Buy, recommend is-a has an must be dangerous enter depends on

slide-3
SLIDE 3

1/21/2010 3

videogame

  • The customer enters the store

to buy a toy. It has to be a toy that his daughter likes and it must cost less than 50 Euro. He tries a videogame, which uses a data glove and a head- mounted display. He likes it.

./('

An assistant helps him. The suitability of the game depends

  • n the age of the child. His

daughter is only 3 years old. The assistant recommends another type of toy, namely a boardgame. The customer buy the game and leaves the store customer enters depends store

Customer ? enter() toy daughter suitable *

less than 50

store enter() toy buy()

toy age videogame daughter boardgame '

Toy price buy() like()

buy type of toy

boardgame daughter age

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14

"

  • #'(A@
  • '
  • =
  • .)
  • () ,*)
  • ) (
  • ") B)
  • Bernd Bruegge & Allen H. Dutoit

Object-Oriented Software Engineering: Using UML, Patterns, and Java 15

  • *

,*$ * 6

  • (#'

(C*#@

  • ".7

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16

&./

2*#$ *5 2D5 E 0 F 0

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17

"/0

  • =
  • 6#
  • 6
  • 6*

2*5

  • @#
  • 6'
  • '

#

  • #$#$
  • Bernd Bruegge & Allen H. Dutoit

Object-Oriented Software Engineering: Using UML, Patterns, and Java 18

"/0

  • 6 #
  • ,#

#

slide-4
SLIDE 4

1/21/2010 4

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 19

&

  • #
  • GG#
  • !'#
  • '#
  • ,##
  • (?6@
  • 3'4

/'

  • 6

#