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

Slides:



Advertisements
Similar presentations
Author: Graeme C. Simsion and Graham C. Witt Chapter 8 Organizing the Data Modeling Task.
Advertisements

1 Computer Science 340 Software Design & Testing Inheritance & Design By Contract.
Object Oriented Design An object combines data and operations on that data (object is an instance of class) data: class variables operations: methods Three.
Object-Oriented Analysis and Design Lecture 8 State Space, Behavior, and Type Conformance.
State Diagram. What is State Diagram?  State diagram is used to show the state space of a given class, the events that cause a transition from one state.
Class Diagram & Object Diagram
Lecturer: Dr. AJ Bieszczad Chapter 66-1 Object-Oriented analysis and design Special nature of OO development Use cases Design with UML OO system design.
1 CS/CPE 426 Senior Projects Chapter 21: State Machines Chapter 22:Advanced State Machines [Arlow and Neustadt 2005] March 24, 2009.
Developing an IT Application Using Advantage:Gen  Data Modeling: I-bars and subtypes.
Lecture a: Additional UML Models: Package, Activity, Deployment Lecture b: Generalization, Aggregation and Additional Domain Model Notation Copyright W.
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
Subclasses and Subtypes CMPS Subclasses and Subtypes A class is a subclass if it has been built using inheritance. ▫ It says nothing about the meaning.
Unified Modeling Language(UML) BY
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
1 Abstraction  Identify important aspects and ignore the details  Permeates software development programming languages are abstractions built on hardware.
What is MOF? The Meta Object Facility (MOF) specification provides a set of CORBA interfaces that can be used to define and manipulate a set of interoperable.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
11 Software Engineering Dr. K. T. Tsang Lecture 9 Advance State Modeling
Class Design III: Advanced Inheritance Additional References “Object-Oriented Software Development Using Java”, Xiaoping Jia, Addison Wesley, 2002 “Core.
1 Lecture 6: Operation Contracts. 2 Overview  What is contract ?  The guidelines for writing contracts for the system operations.  Use Case realizations.
CSC480 Software Engineering Lecture 11 September 30, 2002.
CS551 - Lecture 8 1 CS551 Modelling with Objects (Chap. 3 of UML) Yugi Lee STB #555 (816)
1 OCL The Role of OCL in UML. 2 רשימת הנושאים  מבוא  מרכיבי השפה  דוגמאות  מקורות.
David Evans CS201j: Engineering Software University of Virginia Computer Science Lecture 12: Subtyping Rules What’s the.
Relationships Relationships between objects and between classes.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 17: Inheritance & Behavioral.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
State Modeling. Events An event is an occurrence at a point in time, such as user depresses left button or.
CS3773 Software Engineering Lecture 06 UML State Machines.
Dr. Bhavani Thuraisingham September 24, 2008 Building Trustworthy Semantic Webs Lecture #9: RDF and RDF Security.
 Engineering Quality Software.  Today o State Diagrams Jerry Kotuba SYST30009-Engineering Quality Software 2.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Domain Inheritance Scaling Agility using Domain Inheritance.
CSSE501 Object-Oriented Development. Chapter 10: Subclasses and Subtypes  In this chapter we will explore the relationships between the two concepts.
Refining the Use Cases 1. How Use Cases Evolve  Early efforts typically define most of the major use cases.  The refining stages complete the process.
subtype 1.inherits all attributes of the supertype 2.inherits all relationships of the supertype 3. usually has its own attributes or.
6-1 Type Conformance and Closed Behavior Constructing class hierarchiesConstructing class hierarchies –need to be careful –two helpful principles: type.
DBC NOTES. Design By Contract l A contract carries mutual obligations and benefits. l The client should only call a routine when the routine’s pre-condition.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Class Relationships Lecture Oo07 Generalization Relationships.
Interpreting the Object Constraint Presented by: Ed Kausmeyer.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
CS551 - Lecture 7 1 CS551 Interaction Models (Chapter 4 of UML) Yugi Lee STB #555 (816)
CS551 - Lecture 6 1 CS551 Modelling with Objects (Chap. 3 of UML) Yugi Lee STB #555 (816)
UML Review: State Machines. Sept. 17, 2003Lecture 5: CS660 Fall Overview States Transitions Activities Modeling object lifeline Creating well-structured.
The Enhanced Entity- Relationship (EER) Model
Use Case Modeling - II Lecture # 27.
Object-Oriented Analysis and Design
Class Diagrams.
State-Space and Behavior
State Machine Diagrams
CS551 UML for Distributed Objects (Engineering Distributed Objects)
CS251 – Software Engineering Lectures 11 State Diagrams
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
UML Activity Diagrams & State Charts
אפיון ועיצוב מערכות מוכוון עצמים
CS/CPE 426 Senior Projects
Chapter 14: Activity Diagrams
Chapter 20 Object-Oriented Analysis and Design
Understand and Use Object Oriented Methods
CS/CPE 426 Senior Projects
Lecture #6: RDF and RDF Security Dr. Bhavani Thuraisingham
CS551 Behavior Models: Object Types and Operations (Chap. 3 of UML)
Chapter 14: Activity Diagrams
Weak Entities (cont…) Entities that do not have key attributes of their own Related to specific entities from another entity type plus their own attributes.
CS 791Z State Machines & Advanced State Machines
ADVANCED OBJECT-ORIENTED PROGRAMMING
UML State Diagrams (Ch. 29)
Presentation transcript:

CS551 Behavior Models: Object Types and Operations (Chap. 3 of UML) Yugi Lee STB #555 (816) 235-5932 yugi@cstp.umkc.edu www.cstp.umkc.edu/~yugi CS551 - Lecture 6-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. CS551 - Lecture 6-2

Classes & Types CS551 - Lecture 6-2

Type Expression Subtype: Multiple Supertypes Type Exclusion Cow Mammal Multiple Supertypes Bat Mammal * Flier Type Exclusion TA1 * TA2 = Type Partitioning: TA = TA1+TA2 CS551 - Lecture 6-2

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. CS551 - Lecture 6-2

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 CS551 - Lecture 6-2

CS551 - Lecture 6-2

State Transitions as Actions CS551 - Lecture 6-2

Translating State Transitions to Actions action Type::a1 pre: s1 & precond post: s2 & postcond action Pump::hangup pre: ready post: idle action Pump::pickup pre: idle post: ready CS551 - Lecture 6-2

State Charts of Specification Types CS551 - Lecture 6-2

State Charts of Specification Types action Drawing_Editor::select (shape:Shape) post: current_doc_contents -> forAll ( s | ((s.selected & s=shape)@pre ==> s.unselected) & ((s.unselected & s=shape)@pre ==> s.selected)) CS551 - Lecture 6-2

Sequence Expression S1 ; S2 S1 always precedes S2 S1 | S2 S1 or S2 Any number of repetitions of S1 S1 || S2 S1 concurrent with S2 CS551 - Lecture 6-2

The Meaning of Containment Containment represents a localized view, which is a state type of the common usage. CS551 - Lecture 6-2

Type Specifications: Summary An object’s 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. CS551 - Lecture 6-2