CS551 - Lecture 8 1 CS551 Modelling with Objects (Chap. 3 of UML) Yugi Lee STB #555 (816) 235-5932

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Object-oriented modeling Class/Object Diagrams
Chapter 3 Data Modeling Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Unified Modeling Language
Object-Oriented Analysis and Design
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
SE-565 Software System Requirements More UML Diagrams.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Data Flow Diagrams.
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 121 Software Design I Lecture 10.
TAL7011 – Lecture 4 UML for Architecture Modeling.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Week III  Recap from Last Week Review Classes Review Domain Model for EU-Bid & EU-Lease Aggregation Example (Reservation) Attribute Properties.
Design Model Lecture p6 T120B pavasario sem.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
 Building Block Building Block  Things in the UML Things in the UML  Structural Things Structural Things  Behavioral Things Behavioral Things  Grouping.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
Session 3 How to Approach the UML Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 5, 2011 Presented by Kang-Pyo Lee.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Design and implementation Chapter 7 – Lecture 1. Design and implementation Software design and implementation is the stage in the software engineering.
Gerhard Dueck -- CS3013Analysis 1. Gerhard Dueck -- CS3013Analysis 2 Why analysis?  Yield a more precise specification of the requirements.  Introduce.
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
1 Kyung Hee University Interaction Diagrams Spring 2001.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Systems Architectures System Integration & Architecture.
Object Oriented Analysis & Design By Rashid Mahmood.
UML. Model An abstract representation of a system. Types of model 1.Use case model 2.Domain model 3.Analysis object model 4.Implementation model 5.Test.
CS551 - Lecture 7 1 CS551 Interaction Models (Chapter 4 of UML) Yugi Lee STB #555 (816)
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
CS551 - Lecture 6 1 CS551 Modelling with Objects (Chap. 3 of UML) Yugi Lee STB #555 (816)
Analysis Classes Unit 5.
UML Diagrams By Daniel Damaris Novarianto S..
The Movement To Objects
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Unified Modeling Language
Lecture 2 The Relational Model
UML Diagrams Jung Woo.
State Machine Diagrams
Object-Oriented Analysis
Informatics 121 Software Design I
Unified Modeling Language
Patterns.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
CS551 Behavior Models: Object Types and Operations (Chap. 3 of UML)
Presentation transcript:

CS551 - Lecture 8 1 CS551 Modelling with Objects (Chap. 3 of UML) Yugi Lee STB #555 (816)

2 CS551 - Lecture 8 Object Modelling Static model: the state of an object at any given moment (object attributes, relationships, constraints between objects) Dynamic model: the changes that happen to the state as event occur (actions affect objects, using the changes of objects and attributes in the object state) Interactive model: interactions between objects (the responsibility for achieving goal is divided among collaborating objects)

3 CS551 - Lecture 8

4 Modeling Objects: Definitions Object: anything that presents a definable encapsulated behavior to the world around it; e.g. individual programming-language objects, software components, programs, Type: a collection of objects with similar behaviors, satisfying the specification of that type Type model: Behaviors are specified in terms of attributes, a valid abstract model of many possible implementations.

5 CS551 - Lecture 8

6 Static Model The state of an object at any given point in time: individual identity, characteristic behavior, and state (a combination of stored state and executable code) –a set of attributes: properties that define information on the state of the object at any point in time; e.g. a set of LineItems (quantity of a product), the orderTotal, and the Customer. –a set of static invariants: rules on what combinations of attribute values are valid for that object's state to be valid; e.g. "no two LineItems can be for the same Product", or "the orderTotal cannot be greater than the customer's credit limit".

7 CS551 - Lecture 8 Type Model Sales System > Interface Operations of System System of Interest Model of object types for terms used to specify system operations Not a stored data model Object type and abstract attribute Sale SaleItem quantity Payment Authorization * * * currSale Cust Product inventory

8 CS551 - Lecture 8 Modeling State A snapshot shows a set of objects and their configuration at a point in time (the values of their attributes or links to other objects). A filmstrip shows a sequence of snapshots evolving through the steps of a scenario.

9 CS551 - Lecture 8 Modeling Object State Attributes: model and reality Parameterized attribute –session-5.startDate.isLessThan (today) –session-5.startDate < today Association: a pair of attributes that are inverses of each other, drawn as a line joining the two types on a type model.

10 CS551 - Lecture 8

11 CS551 - Lecture 8 Modeling Object State: Invariants Collections –Set: a collection of objects without any duplicates; –Bag: a collection with duplicates of elements; –Seq: a sequence-a bag with an ordering of its elements. Operators: –dot (“.”) operator for a collection evaluates an attribute on every element of the collection; e.g., clients.sessions = Set {s1, s5, s9} –The -> operator for a collection evaluates an attribute on the collection itself; e.g., client3.sessions -> count =3

12 CS551 - Lecture 8 Modeling Object State: Invariants forAll, exists //every one of laura’s session grades is better than pass. laura.sessions.grade -> forAll (g|g.betterThan(Grade.pass)) union (+), intersection (*), difference (-) //the courses taught by either laura.sessions.course + marty.sessions.course //the courses taught by both laura.sessions.course * marty.sessions.course //the course taught by Laura that are not taught by Marty laura.session.course - marty.sessions.course

13 CS551 - Lecture 8 Static Invariants Boolean Operators: an invariant is a Boolean expression & Quantifier (forall, exists) –and (&), or (|), a implies b (a ==> b), not a (!a), –aSet -> forall (x|P(x)) is equivalent to x:aSet::P(x), –aSet -> exists (x|P(x)) is equivalent to exist x:aSet, P(x) Context Operator(::); short for an explicit forall // a session has an evaluation exactly when it is completed. –inv Session::self.completed = (self.eval <> null) –inv Session -> forall (self | self.completed = (self.eval <> null))

14 CS551 - Lecture 8 Boolean Operators

15 CS551 - Lecture 8

16 CS551 - Lecture 8 Dictionary The collected set of definitions of modeling constructs. The definitions must include – the formal modeling and specification bits (relating the formal names and symbols to each other) – the (usually informal) description that relate the symbols and names to things in the problem domain. Dictionary definitions are scoped according to package scope rules.

17 CS551 - Lecture 8 A Typical Dictionary

18 CS551 - Lecture 8 Static Model: Summary Describes the state of the business or the component(s) we are interested in, with a set of attributes, together with an invariant, constitutes the static part of a type model. –each concept is described with a type –its state is described with attributes and associations –The invariant express constraints on the state: combinations of values that should always be observed. To provide a vocabulary in which to describe actions, which include interactions in a business, between user and software, or between objects inside the software. Snapshots are used to represent specific situations, and helps to develop the static model.