Part 2: Design Methodology Object-Oriented Modeling and Design

Slides:



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

System Modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers. Different.
Ch 12: Object-Oriented Analysis
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Information System Design IT60105
Lecture 9 Object-Oriented Analysis
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 7 Using Data Flow Diagrams
Topics Creating DFD Physical and logical DFD Event driven modeling
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 71 System models l Abstract descriptions of systems whose requirements are being analysed.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Software Engineering CSE470: Requirements Analysis 1 Requirements Analysis Defining the WHAT.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 9 Using Data Flow Diagrams
Chapter 7 Using Data Flow Diagrams
9 1 Chapter 9 Database Design Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 7 Structuring System Process Requirements
Business Modeling Domain Modeling Source: Use Case Driven Object Modeling with UML – A Practical Approach By Doug Rosenberg ISBN:
Chapter 7: The Object-Oriented Approach to Requirements
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
System Analysis Overview Document functional requirements by creating models Two concepts help identify functional requirements in the traditional approach.
USE Case Model.
Objects What are Objects Observations
Introduction To System Analysis and design
Data Flow Diagrams (DFDs)
INTROSE Introduction to Software Engineering Raymund Sison, PhD College of Computer Studies De La Salle University Analysis Modeling.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Chapter 7 Using Data Flow Diagrams
ITEC224 Database Programming
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.
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
Approaching a Problem Where do we start? How do we proceed?
MCS 270 Spring 2014 Object-Oriented Software Development.
Chapter 7 System models.
Object oriented classification Classification is the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute.
Slide 1 System models. Slide 2 Objectives l To explain why the context of a system should be modelled as part of the RE process l To describe behavioural.
System models l Abstract descriptions of systems whose requirements are being analysed.
Pertemuan 19 PEMODELAN SISTEM Matakuliah: D0174/ Pemodelan Sistem dan Simulasi Tahun: Tahun 2009.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
MODULE 3 Analysis and system design
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Analysis and Design. PROCESS OVERVIEW A software development process provides a basis for the organized production.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
SWEN 5231 FORMAL METHODS Slide 1 System models u Abstract presentations of systems whose requirements are being analyzed.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Application Analysis. Application Interaction Model The purpose of analysis is to understand the problem so.
Dillon: CSE470: ANALYSIS1 Requirements l Specify functionality »model objects and resources »model behavior l Specify data interfaces »type, quantity,
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Architecture Concept Documents
Abstract descriptions of systems whose requirements are being analysed
OBJECT RELATIONSHIPS, ATTRIBUTES, AND METHODS
University of Houston-Clear Lake
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Use Case Analysis – continued
Presentation transcript:

Part 2: Design Methodology Object-Oriented Modeling and Design Analysis Chapter 8 Part 2: Design Methodology Object-Oriented Modeling and Design Byung-Hyun Ha bhha@pusan.ac.kr

Lecture Outline Introduction Problem Statement Object Modeling Dynamic Modeling Functional Modeling Adding Operations Iterating the Analysis

Introduction Analysis phase Purpose of object-oriented analysis Devising a precise, concise, understandable, and correct model of the real-world Understand the requirements and the real-world environment Purpose of object-oriented analysis To model the real-world system so that it can be understood To do this, we must examine requirements, analyze their implication, and restate them rigorously; and abstract important real-world features first and defer small details until later Successful analysis model states what must be done, without restricting how it is done; and avoids implementation decisions

Introduction Overview of analysis process

Introduction Importance of each model (O/D/F) depends on the problem Almost all problems have useful object models derived from real-world entities Problems concerning interactions and timing, such as user interfaces and process control, have important dynamic models Problems containing significant computation, such as compilers and engineering calculations, have important functional models Analysis cannot always be carried out in rigid sequence Large models are built up iteratively Analysis is not a mechanical process The analyst must communicate with the requestor to clarify ambiguity and misconceptions

Problem Statement Problem statement Task of analyst states what is to be done and not how it is to be done Problem scope, what is needed, application context, assumptions, and performance needs should be a statement of needs, not a proposal for a solution is just starting point for understanding problem, not an immutable documents Task of analyst To resolve ambiguity, incompleteness, and inconsistency To separate the true requirements from design and implementation decisions disguised as requirements To work with the requestor to refine the requirements so they represent the requestor’s true intent If you do exactly what the customer asked for, but the result does not meet the customer’s real needs, you will be probably blamed anyway!

Problem Statement Example problem statement Section 8.3, page 151

Object Modeling Object model precedes other models, because static structure is usually better defined, less dependent on application details, more stable as the solution evolves, and easier for humans to understand Information for the object model comes from the problem statement, expert knowledge of the application domain, and general knowledge of the real world Object diagrams promote communication between computer professionals and application-domain experts

Object Modeling Object model construction steps  Operations Identify objects and classes Prepare a data dictionary Identify associations (including aggregations) between objects Identify attributes of objects and links Organize and simplify object classes using inheritance Verify that access paths exist for likely queries Iterate and refine the model Group classes into modules  Operations Add operations to classes later as a by-product of constructing the dynamic and functional models

Object Modeling Identifying object classes Not all classes are explicit in the problem statement; some are implicit in the application domain or general knowledge Don’t be too selective; write down every class that comes to mind Classes often correspond to nouns; for example, in a statement “a reservation system to sell tickets to performance at various theaters” tentative classes would be Reservation, System, Ticket, Performance, and Theater Don’t worry much about inheritance or high-level classes

Object Modeling Identifying object classes ATM classes extracted from problem statement nouns ATM classes identified from knowledge of problem domain

Object Modeling Unnecessary and incorrect classes Redundant classes Keep the most descriptive one Irrelevant classes Vague classes Attributes Names that primarily describe individual objects Operations Roles The name of a class should reflect its intrinsic nature and not a role that it plays in an association Implementation constructs Later during design

Object Modeling Keeping right classes ATM example

Object Modeling Preparing data dictionary Write a paragraph precisely describing each object class The data dictionary also describes associations, attributes, and operations

Object Modeling Identifying associations Any dependency between two or more classes is an association A reference from one class to another is an association Attributes should not refer to classes; use an association instead Associations often correspond to stative verbs or verb phrases physical location: next to, part of, contained in, … direct actions: drives, … communication: talks to, … ownership: has, part of, … satisfaction of some condition: works for, married to, nanages, … etc. Association for the ATM example (next slide)

Object Modeling Unnecessary and incorrect associations Associations between eliminated classes Irrelevant or implementation associations Actions An association should describe a structural property, not a transient event e.g. ATM accepts cash card: part of interaction cycle, not a permanent relationship Ternary associations Cashier enters transaction for account  Cashier enters transaction + Transaction concerns account Derived associations Grandparent of vs. Parent of Sometimes they are needed

Object Modeling Specifying semantics of associations Name of association Names are important to understanding and should be chosen with great care Role names Add role name where appropriate Qualified associations Multiplicity Don’t put too much effort into getting it right, as multiplicity often changes during analysis Challenge multiplicity values of “one” Missing associations

Object Modeling Initial object diagram for ATM system

Object Modeling Identifying attributes Attributes usually correspond to nouns followed by possessive phrases e.g. the color of car, the position of cursor Attributes are less likely to be fully described in the problem statement Fortunately attributes seldom affect the basic structure of the problem Do not carry discovery of attributes to excess Derived attributes should be omitted or clearly labeled Link attributes should also be identified

Object Modeling Unnecessary and incorrect attributes Objects Qualifier Names Names are often better modeled as qualifiers rather than object attributes Identifiers Link attributes Link attributes are usually obvious on many-to-many associations Internal values Fine detail Discordant attributes They are sign of splitting a class into distinct classes ATM object model with attributes (next slide)

Object Modeling Refining with inheritance Two directions By generalizing common aspects of existing classes into a superclass (bottom up) By refining existing classes into specialized subclasses (top down) Avoid excessive generalization and refinement! Multiple inheritance may be used to increase sharing, but only if necessary It increases both conceptual and implementation complexity ATM object model with inheritance (next slide)

Object Modeling Remaining topics (see the textbook) Testing assess paths Iterating object modeling Grouping classes into modules Final ATM object model (next slide)

Dynamic Modeling Dynamic model Time-dependent behavior of the system and the objects in it Begin dynamic analysis by looking for events Dynamic model is insignificant for a purely static data repository, such as a database Dynamic model is important for interactive systems Construction steps Prepare scenarios of typical interaction sequences Identify events between objects Prepare an event trace for each scenario Build a state diagram Match events between objects to verify consistency

Dynamic Modeling Preparing scenario A scenario is a sequence of events Prepare for normal cases (without error condition), and then special cases For each event, identify the actor and parameters Normal ATM scenario and ATM scenario with exception (next slide)

Dynamic Modeling Interface formats Most interactions can be separated into two parts: application logic and user interface The analyst should concentrate first on the information flow and control, rather than the presentation format Possible ATM layout

Dynamic Modeling Identifying events Examine scenarios to identify all external events An action by an object that transmit information is an event Event trace An ordered list of events between different objects Event flow diagram Summarizing events between classes, without regard for sequence Dynamic counterpart to object diagram Event trace and event flow diagram for ATM scenario (next two slides)

Dynamic Modeling Building a state diagram Prepare a state diagram for each object class with nontrivial dynamic behavior Pick a trace showing a typical interaction and only consider the event affecting a single object Interval between any two events is a state; give each state a name if a name is meaningful Find loop within the diagram; replace finite sequences of events with loops when possible Merge other scenarios into the state diagram Add boundary cases and special cases Test completeness and error-handling capabilities of a class Posing “What if” question Etc. (Blah-blah-blah…) State diagrams for class ATM, Consortium, and Bank (next two slides)

Functional Modeling Functional model Construction steps Which values depend on which other values and functions that relate them Functions are expressed in various ways, including natural language, mathematical equations, and pseudocode Processes on a data flow diagram corresponds to activities or actions in the state diagram of classes Flows on a data flow diagram correspond to objects or attribute values in an object diagram Construction steps Identify input and output values Build DFD showing functional dependencies Describe functions Identify constrains Specify optimization critera

Functional Modeling Identifying input and output values Input and output values are parameters of events between the system and the outside world Input and output values for ATM system

Functional Modeling Building data flow diagram How each output value is computed from input values Work backward from each output value to determine the function that computes it DFD is usually constructed in layers Top level data flow diagram for ATM

Functional Modeling Building data flow diagram (cont’) Expand each nontrivial process in the top-level diagram into a lower-level data flow diagram DFD for ATM perform transaction process

Functional Modeling Describing functions Identifying constraint between objects e.g. Invariants, preconditions, … Specifying optimization criteria

Adding Operations Operations from object model Operations from events Reading and writing attribute values and association links Operations from events Each event sent to an object corresponds to an operation on the object Operations from functions Each function in DFD corresponds to an operation on the object Shopping list operations Meaningful operations in objects’ own right They provide an opportunity to broaden the base of an object definition beyond the narrow needs of the immediate problem Simplifying operations

Iterating the Analysis Refining the analysis model Reexamine the model carefully Sometimes major restructuring in the model is needed as your understanding increases Restating the requirements