CS551 Behavior Models: Object Types and Operations (Chap. 3 of UML) - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

CS551 Behavior Models: Object Types and Operations (Chap. 3 of UML)

Description:

a specification of a set of objects. Subclassing ... Bat Mammal * Flier. Type Exclusion. TA1 * TA2 = Type Partitioning: TA = TA1 TA2. 5 ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 15
Provided by: Yugi6
Category:

less

Transcript and Presenter's Notes

Title: CS551 Behavior Models: Object Types and Operations (Chap. 3 of UML)


1
CS551 Behavior Models Object Types and
Operations (Chap. 3 of UML)
  • Yugi Lee
  • STB 555
  • (816) 235-5932
  • yugi_at_cstp.umkc.edu
  • www.cstp.umkc.edu/yugi

2
Subtypes and Type Extension
  • Class
  • an object-oriented programming (OOP) construct
    (implementation of some objects)
  • Type
  • a specification of a set of objects
  • Subclassing
  • inheriting implementation with certain forms of
    overriding of implementation
  • Subtyping
  • no overriding of specifications, only extension.

3
Classes Types
4
Type Expression
  • Subtype
  • Cow Mammal
  • Multiple Supertypes
  • Bat Mammal Flier
  • Type Exclusion
  • TA1 TA2
  • Type Partitioning
  • TA TA1TA2

5
State Type
  • A set of objects defined by a predicate
  • Objects are classified based on a condition and
    define resultant properties they will have
  • An employee is a person with an employer
    employees have a salary and can get fired.

6
State Chart
  • Each state is a Boolean attribute
  • The structure of states defines invariants across
    these attributes.
  • States are
  • mutually exclusive.
  • can be nested inside a state.
  • can be divided into concurrent sections

7
(No Transcript)
8
State Transitions as Actions
9
Translating State Transitions to Actions
action Typea1 pre s1 precond post s2
postcond
  • action Pumphangup
  • pre ready
  • post idle
  • action Pumppickup
  • pre idle
  • post ready

10
State Charts of Specification Types
11
State Charts of Specification Types
action Drawing_Editorselect (shapeShape) post
current_doc_contents -gt forAll ( s
((s.selected sshape)_at_pre gt
s.unselected) ((s.unselected sshape)_at_pre
gt s.selected))
12
Sequence Expression
  • S1 S2
  • S1 always precedes S2
  • S1 S2
  • S1 or S2
  • S1
  • Any number of repetitions
  • of S1
  • S1 S2
  • S1 concurrent with S2

13
The Meaning of Containment
Containment represents a localized view, which is
a state type of the common usage.
14
Type Specifications Summary
  • An objects behavior (or part of it) can be
    described with a type specification.
  • A type specification is a set of action
    specifications
  • A postcondition a relationship between the
    states before and after any of its occurrences
    takes place.
  • A precondition when the associated postcondition
    is applicable.
Write a Comment
User Comments (0)
About PowerShow.com