University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 1 Lecture 16: Object Oriented Modeling Methods Basics of Object.

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

SEG3101 (Fall 2010) Structural Modeling
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Modeling Main issues: What do we want to build How do we write this down ©2008 John Wiley & Sons Ltd. vliet.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Chapter 1 Object-Oriented System Development
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Object Oriented System Development with VB .NET
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
1 Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn.
University of Toronto Department of Computer Science CSC444 Lec04- 1 Lecture 4: Software Lifecycles The Software Process Waterfall model Rapid Prototyping.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
Introduction To System Analysis and design
These slides are designed to accompany Web Engineering: A Practitioner’s Approach (The McGraw-Hill Companies, Inc.) by Roger Pressman and David Lowe, copyright.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec13 1 Lecture 13: Representing software designs Viewpoints Structural.
University of Toronto Department of Computer Science CSC444 Lec05- 1 Lecture 5: Decomposition and Abstraction Decomposition When to decompose Identifying.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
Unified Modeling Language, Version 2.0
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Chapter 5 Models and UML Notation for The Object-Oriented Approach.
CSC480 Software Engineering Lecture 11 September 30, 2002.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 8: Analysis Modeling Software Engineering: A Practitioner’s Approach, 6/e Chapter.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Chapter 8 Analysis & Modeling. Data Modeling examines data objects independently of processing focuses attention on the data domain creates a model at.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Lecture 1: Introduction to Software Engineering WXGE6103 Software Engineering Process and Practice Object-oriented Design.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Internet and Intranet Protocols and Applications Lecture 5a: HTTP Client-Server Design and Implementation February 15, 2005 Arthur Goldberg Computer Science.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
© 2000 Franz Kurfess System Design Methods 1 CSC 205: Software Engineering I Dr. Franz J. Kurfess Computer Science Department Cal Poly.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Basic Characteristics of Object-Oriented Systems
UML (Unified Modeling Language)
Elements Of Modeling. 1.Data Modeling  Data modeling answers a set of specific questions that are relevant to any data processing application. e.g. ◦
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Cmpe 589 Spring 2006.
The Movement To Objects
Main issues: • What do we want to build • How do we write this down
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
Object-Oriented Analysis
Appendix A Object-Oriented Analysis and Design
Software Construction Lecture 2
Copyright 2007 Oxford Consulting, Ltd
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 1 Lecture 16: Object Oriented Modeling Methods Basics of Object Oriented Analysis Notations used Modeling Process Variants Coad-Yourdon Shlaer-Mellor Fusion UML Advantages and Disadvantages

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 2 Object Oriented Analysis Background Model the requirements in terms of objects and the services they provide Grew out of object oriented design partitions the problem in a different way from structured approaches Poor fit moving from Structured Analysis to Object Oriented Design Motivation OOA is (claimed to be) more ‘natural’ As a system evolves, the functions (processes) it performs tend to change, but the objects tend to remain unchanged… …so a structured analysis model will get out of date, but an object oriented model will not… …hence the claim that object-oriented systems are more maintainable OOA emphasizes importance of well-defined interfaces between objects compared to ambiguities of dataflow relationships NOTE: OO applies to requirements engineering because it is a modeling tool. But in RE we are modeling domain objects, not the design of the new system

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 3 Modeling primitives Objects an entity that has state, attributes and services Interested in problem-domain objects for requirements analysis Classes Provide a way of grouping objects with similar attributes or services Classes form an abstraction hierarchy though ‘is_a’ relationships Attributes Together represent an object’s state May specify type, visibility and modifiability of each attribute Relationships ‘is_a’ classification relations ‘part_of’ assembly relationships ‘associations’ between classes Methods (services, functions) These are the operations that all objects in a class can do… …when called on to do so by other objects E.g. Constructors/Destructors (if objects are created dynamically) E.g. Set/Get (access to the object’s state) Message Passing How objects invoke services of other objects Use Cases/Scenarios Sequences of message passing between objects Represent specific interactions See also: van Vliet 1999, section 12.2

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 4 Key Principles Classification (using inheritance) Classes capture commonalities of a number of objects Each subclass inherits attributes and methods from its parent Forms an ‘is_a’ hierarchy Child class may ‘specialize’ the parent class by adding additional attributes & methods by replacing an inherited attribute or method with another Multiple inheritance is possible where a class is subclass of several different superclasses. Information Hiding internal state of an object need not be visible to external viewers Objects can encapsulate other objects, and keep their services internal useful for forming abstractions Aggregation Can describe relationships between parts and the whole See also: van Vliet 1999, section 12.2

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 5 Information Hiding System Model Service 1 Service 2 Service 3 Service 4 Service 5 Service 6 Method 1 Method 2 Object 1 Method 1 Method 2 Object 3 Method 1 Method 2 Object 2 Objects can contain other objects (compare with hierarchies of dataflow diagram in Structured Analysis)

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 6 Nearly anything can be an object… External Entities …that interact with the system being modeled E.g. people, devices, other systems Things …that are part of the domain being modeled E.g. reports, displays, signals, etc. Occurrences or Events …that occur in the context of the system E.g. transfer of resources, a control action, etc. Roles played by people who interact with the system Organizational Units that are relevant to the application E.g. division, group, team, etc. Places …that establish the context of the problem being modeled E.g. manufacturing floor, loading dock, etc. Structures that define a class or assembly of objects E.g. sensors, four-wheeled vehicles, computers, etc. Some things cannot be objects: procedures (e.g. print, invert, etc) atomic attributes (e.g. blue, 50Mb, etc) See also: van Vliet 1999, section 12.3

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 7 Selecting Objects Need to choose which candidate objects to include in the analysis Coad & Yourdon suggest each object should satisfy (most of) the following criteria: Retained information: Does the system need to remember information about this object? Needed Services: Does the object have identifiable operations that change the values of its attributes? Multiple Attributes: If the object only has one attribute, it may be better represented as an attribute of another object Common Attributes: Does the object have attributes that are shared with all occurrences of the object? Common Operations: Does the object have operations that are shared with all occurrences of the object? Note: External entities that produce or consume information essential to the system are nearly always objects Many candidate objects will be eliminated or combined Source: Adapted from Pressman, 1994, p244

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 8 Variants Coad-Yourdon Developed in the late 80’s Five-step analysis method Shlaer-Mellor Developed in the late 80’s Emphasizes modeling information and state, rather than object interfaces Fusion Second generation OO method Introduced message sequence charts Unified Modeling Language (UML) Third generation OO method An attempt to combine advantages of previous methods See also: van Vliet 1999, section 12.3

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 9 Coad-Yourdon Five Step Process: 1. Identify Objects & Classes (i.e. ‘is_a’ relationships) 2. Identify Structures (i.e. ‘part_of’ relationships) 3. Define Subjects A more abstract view of a large collection of objects Each classification and assembly structure become one subject Each remaining singleton object becomes a subject (although if there a many of these, look for more structure!) Subject Diagram shows only the subjects and their interactions 4. Define Attributes and instance connections 5a. Define services - 3 types: Occur (create, connect, access, release) These are omitted from the model as every object has them Calculate (when a calculated result from one object is needed by another) Monitor (when an object monitors for a condition or event) 5b. Define message connections These show how services of one object are used by another Shown as dotted lines on object and subject diagrams Each message may contain parameters Source: Adapted from Pressman, 1994, p242 and Davis 1990, p98-99

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 10 Coad Object diagrams patient Name Date of Birth Height Weight In-patient Room Bed Physician Out-patient Last visit next visit physician patient Name Date of Birth Height Weight heart Natural/artif. Orig/implant normal bpm eyes Natural/artif. Vision number kidney Natural/artif. Orig/implant number classificationassembly object attributesoptional One-to-one One-to-many mandatory services Source: Adapted from Davis, 1990, p67-68

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 11 Shlaer-Mellor Three analysis models: Information Model models objects, relationships, and attributes of objects and relationships uses associative objects to represent relationships between other objects. E.g. ‘title’ is an object that represents the relationship between ‘owner’ and ‘car’ State model Uses StateCharts to show the lifecycle of each object Each object may be continuous or born-and-die (object is created & destroyed) Process model representation of each service (‘action’) of an object Uses standard Dataflow Diagrams to show information used 1. HOME (H) * address * Unit at address square feet property tax fee 1. HOME OWNER (HO) * Owner name address 1. OWNERSHIP (O) * Address (R1) * Unit at Address (R1) * Owner name (R1) Date purchased owns Is owned by Identifier Associative Object One or more Exactly one

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 12 Fusion Combines several OO methods Analysis phase: Object model like Shlaer-Mellor Operation model formal definition of each operation, including pre- and post- conditions Lifecycle model specifies admissible sequences of interactions between system & environment Interaction model = operation model + lifecycle model Message Sequence Charts help to develop the interaction model Message Sequence Charts UserSystem External system Event 1 Event 2 Response Event 3 Response

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 13 Unified Modeling Language (UML) Third generation OO method Booch, Rumbaugh & Jacobson are principal authors Still in development Attempt to standardize the proliferation of OO variants Is purely a notation No modeling method associated with it! But has been accepted as a standard for OO modeling But is primarily owned by Rational Corp. (who sell lots of UML tools and services) Has a standardized meta-model Class diagrams Use case diagrams Message trace diagrams Object message diagrams State Diagrams (uses Harel’s statecharts) Module Diagrams Platform diagrams

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 14 Evaluation of OOA Advantages of OO analysis for RE Fits well with the use of OO for design and implementation Transition from OOA to OOD ‘smoother’ than from SA to SD (but is it?) Removes emphasis on functions as a way of structuring the analysis Avoids the fragmentary nature of structured analysis object-orientation is a coherent way of understanding the world Disadvantages Emphasis on objects brings an emphasis on static modeling although later variants have introduced dynamic models Not clear that the modeling primitives are appropriate are objects, services and relationships really the things we need to model in RE? Strong temptation to do design rather than problem analysis Too much marketing hype and false claims - e.g. no evidence that objects are a more natural way to think

University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec16 15 References van Vliet, H. “Software Engineering: Principles and Practice (2nd Edition)” Wiley, chapter 12 is a thorough overview of object oriented analysis and design. van Vliet introduces all the main notations of UML, and describes several older methods too. Svoboda, C. P. “Structured Analysis”. In Thayer, R. H and Dorfman, M. (eds.) “Software Requirements Engineering, Second Edition”. IEEE Computer Society Press, 1997, p Excellent overview of the history of structured analysis, and a comparison of the variants Davis, A. M. “Software Requirements: Analysis and Specification”. Prentice-Hall, This is probably the best textbook around on requirements analysis, although is a little dated now.