Gregor v. Bochmann, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher with material from: K.E. Wiegers, D. Leffingwell & D. Widrig,

Slides:



Advertisements
Similar presentations
Methods for Requirements Engineering
Advertisements

SEG3101 (Fall 2010) Structural Modeling
Karolina Muszyńska Based on:
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Object-Oriented Analysis and Design
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Objectives Explain how events can be used to identify use cases that define requirements Identify and analyze events and resulting use cases Explain how.
Introduction To System Analysis and Design
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 4 Class Responsibility Collaboration Cards
© Copyright Eliyahu Brutman Programming Techniques Course.
Methods for requirements engineering. Objectives To explain the role of methods and techniques in requirements engineering To introduce data-flow modelling.
Overview Objective: refine information gathered
2Object-Oriented Analysis and Design with the Unified Process Events and Use Cases  Use case  Activity the system carries out  Entry point into the.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
C++ fundamentals.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
The chapter will address the following questions:
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
CMIS 470 Structured Systems Design
Systems Analysis and Design in a Changing World, Fifth Edition
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
SE-1010 Dr. Mark L. Hornick 1 Introduction to Object-Oriented Programming (OOP) Part 1.
Object-Oriented Modeling
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.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Functional Modeling – Requirement Patterns (Problem Frames)
1 Object orientation. 2 What benefits does OO give? Primarily –Encapsulation (Associates data & operations) –Types & specialisation –Software re-use.
Introduction To System Analysis and Design
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 4: Restaurant.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Miguel Garzón, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher with material from: K.E. Wiegers, D. Leffingwell & D. Widrig, M. Jackson,
GRASP: Designing Objects with Responsibilities
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Objectives Explain how events can be used to identify use cases that define requirements Identify and analyze events and resulting use cases Explain.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Object-Oriented Programming •Object-Oriented Programming (OOP) allows you to create your program based upon modeling objects.  Your program’s properties.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Winter 2011SEG Chapter 11 Chapter 1 (Part 1) Review from previous courses Subject 1: The Software Development Process.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Object-Oriented Systems. Goals Object-Oriented Methodologies – The Rumbaugh et al. OMT – The Booch methodology – Jacobson's methodologies.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Introduction to the Unified Modeling Language.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Object-Oriented Analysis and Design
OO Domain Modeling With UML Class Diagrams and CRC Cards
Start at 17th March 2012 end at 31th March 2012
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

Gregor v. Bochmann, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher with material from: K.E. Wiegers, D. Leffingwell & D. Widrig, M. Jackson, I.K. Bray, B. Selic, Volere, Telelogic, D. Damian, S. Somé 2008, and D. Amyot Structural Modeling SEG3101 (Fall 2010)

SEG3101 (Fall 2010). Functional Modeling 2 Table of Content Entity-Relationship modeling (concepts and notations) Object-oriented modeling (concepts and notations) Methodology for Object-Oriented Analysis (OOA) A case study: A library system

SEG3101 (Fall 2010). Functional Modeling 3 Entity-relationship modeling (ERM) Entity-Relationship modeling (originally proposed by Peter Chen in 1976) Concepts: Entity: represents a type of entity instances, defines the properties that hold for all such instances. Relationship: represents relationship instances that hold between certain pairs of entity instances. The related entity types are also called roles. Multiplicity information indicate how many instances of the “other” side may be related to a given instance of “this” side. Attribute: An entity or a relationship may have one or several attributes. Each attribute is identified by a name and its type, where such a type is usually some simple data type such as integer or character string. Note: An entity type is normally not used as the type of an attribute, because such a situation is rather represented by a relationship between the given entity and the attribute type.

SEG3101 (Fall 2010). Functional Modeling 4 ERM – Meta-model Meta-Model (using UML Class Diagram notation) entity relationship has attribute 0..* three-way relationship 3 0..* has 0..* 0..1 role Constraint: each attribute instance is related exactly to one entity, relationship or three-way relationship. (I could not express this fact by the multiplicity notation)

SEG3101 (Fall 2010). Functional Modeling 5 ERM – Notations (1) There are a variety of notations that have been used for ERM Chen’s notation

SEG3101 (Fall 2010). Functional Modeling 6 ERM – Notations (2) “normal” ERM notation So-called Crow’s foot notation (showing multiplicity) UML Class Diagram notation (note: the notation for multiplicities in UML are more powerful than other notations) Note: the notations are different, but the concepts are the same. artist song performs 1..* 0..*

SEG3101 (Fall 2010). Functional Modeling 7 Object-oriented modeling (OOM) – (1) Object-oriented modeling is essentially ERM with certain additional concepts. An Entity is called a Class Again, various notations have been introduced. We will use in the following the notation of UML Class Diagrams. Additional Concepts: Inheritance: This is the idea that some entity B inherits all properties that are defined for another entity A. This means that B is a specialization of A. One also says that B is a refinement of A or B extends A. Important note: Inheritance is not a relationship as defined above, since it does not define relationship instances between the instances of the two entities. Internal state of entity instances and methods for interacting with it: An important issue of object-orientation is information hiding. In particular, certain internal attributes are not directly accessible from outside the entity instance. An entity is characterized by its interface which includes the list of accessible attributes and the list of methods that can be called for manipulating the internal state of the instance. Note: The methods have behavior – the rest is structure.

SEG3101 (Fall 2010). Functional Modeling 8 Object-oriented modeling (OOM) – (2) Refinement of ERM Concepts: Composite structure: A subtype of Relationship (with special notation) is used to show that one entity is part of another (composed) entity. Calling relationship: Another subtype of Relationship has the meaning that an entity instance playing one role can access attributes and call methods on an instance playing the other role to which it is related. Disadvantages of OOM Difficulties of modeling two-way communication : an interface defines only one direction of communication. For event-based systems, one often needs two-way communication relationships. Note: one can use two one-way relationships. The encapsulation of the behavior inside the objects (the information hiding approach) is often not suitable for modeling the problem domain during requirements engineering (see examples below).

SEG3101 (Fall 2010). Functional Modeling 9 Object-oriented modeling (OOM) – History Proposed approaches for ”OO Analysis” Shlaer and Mellor (1988) Colbert (1989) Coad and Yourdon (1989) Wirf-Brock (1990) Rumbaugh (1991) Jacobson (1992) Martin-Odell (1992) Rational Unified Process (RUP) (1998) UML unifies many of these notations

SEG3101 (Fall 2010). Functional Modeling 10 Methodology for Object-Oriented Analysis (OOA) Five main steps Identify core classes within problem domain Model relationships between classes Class diagram Define the attributes associated with each class Determine relevant operations for each class Define the messages that may be passed between objects Interaction diagram, state machine diagram Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 11 OOA Methodology – Library Example (1) A library system is intended to provide its users with the ability to automate the process of: Acquiring library items Cataloguing library items Browsing library items Loaning library items Library items comprise published and recorded material The system will be administered by a member of the library staff Users must register with the system administrator before they can borrow library items Source: Sommerville & Kotonya Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 12 OOA Methodology – Library Example (2) Library users are drawn from three primary groups Students, Members of staff, and External users All library users have as part of their registration Name, Library number, Address, Account In addition the following information is also required for registration Students – Degree programme and admission number Staff – Staff number External users – Employer details Source: Sommerville & Kotonya Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 13 OOA Methodology – Library Example – Step 1 Identify initial classes Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 14 OOA Methodology – Library Example – Step 2 Identify relationships between classes from the partial requirements (i) A library user borrows a library item (ii) A library item is recorded or published (iii) The system administrator registers the library user (iv) Library users are students, staff, and external users (v) The system administrator catalogues the library items (vi) The library assistant issues the library items Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 15 OOA Methodology – Library Example – Step 2 (2) Show attributes and relationships in basic model Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 16 OOA Methodology – Library Example – Step 2 (3) Identify inheritance relationships for library user Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 17 OOA Methodology – Library Example – Step 2 (4) Identify inheritance relationships for library item Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 18 OOA Methodology – Library Example – Step 3 Identify attributes and populate model with them Attributes can be revealed by the analysis of the system requirements For example, it is a requirement that all library users must be registered before they can use the library This means that we need to keep registration data about library users Library users are also provided with an account to keep track of the items loaned to them Library items may have the attributes title, description, and classmark Library users may have the attributes name, address, and library id Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 19 OOA Methodology – Library Example – Step 4 Identify object operations This step is intended to describe operations to be performed on the objects Certain operations are implicit from the object structure CRUD operations (create – read – update – delete) Operations for accessing and modifying the attribute values (getters and setters) These operations are assumed and we need not show them explicitly in the model One way of identifying operations is by modeling the messages that may be passed between the objects Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 20 OOA Methodology – Library Example – Step 4 (2) Identify messages between objects Find required messages for each scenario (play out the scenario), then take union of all messages Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 21 OOA Methodology – Library Example – Step 4 (3) Populate model of library user with discovered operations Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 22 OOA Methodology – Library Example – Step 4 (4) Populate model of library item with discovered operations Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization Note: This makes no sense as a model of the problem domain. How can a book (library item) perform the method acquire or return ? It may, however, make sense as the internal design of the system-to-be. In this case the objects are instances within the computer system that should reflect the objects in the real world.

SEG3101 (Fall 2010). Functional Modeling 23 OOA Methodology – Library Example – Step 5 Define the messages that may be passed between objects Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 24 OO Analysis – Problems (1) Caution: Not really analysis Most OOA approaches actually address high-level design Assume a pre-existing requirements document Class diagrams can however be used for analysis, especially for the description of domain concepts Use case analysis supplements OOA, filling in some gaps Further composition and decomposition problems Related requirements cannot all be assigned to a single component or a single class One scenario may affect several classes at once OO modularization is not perfect either...  Scattering and tangling effects - Motivation for aspect-oriented analysis and design Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 25 OO Analysis – Problems (2) Requirement1 (R1) Requirement2 (R2) Requirement3 (R3) RequirementN (RN) … Scattering: design elements to support R1 in many components Tangling: single component has elements for many requirements ComponentA R1 elements ComponentF R1 elements R2 elements R3 elements RN elements ComponentE ComponentD R1 elements ComponentB R1 elements ComponentC R1 elements Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization

SEG3101 (Fall 2010). Functional Modeling 26 Aspect Triggered behavior (code) Predicate F.R1 A partial solution – Aspects ClassA R1 elements ClassC R1 elements ClassG R1 elements ClassF R1 elements R2 elements R3 elements RN elements advicepointcut intertype declaration ClassB R1 elements (identifies joinpoints where advice is executed) R1 elements Terminology based on AspectJ: Introduction Structured Analysis OO Analysis Problem Frames State Machine-Based Analysis Triage/Prioritization