CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11.

Slides:



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

Slide 12.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
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.
State Transition Diagrams
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Introduction To System Analysis and Design
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Slide 10B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Chapter 21 Object-Oriented Analysis
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
Unified Modeling Language
Unified Modeling Language(UML) BY
Objects What are Objects Observations
Introduction To System Analysis and design
1 Object Oriented Analysis and Design. 2 Object-Oriented Analysis  Statement of what our client wants Object-Oriented Design  How to provide it using.
OBJECT-ORIENTED ANALYSIS PHASE
Slide 12.1 © The McGraw-Hill Companies, CS 4310: Software Engineering Lecture 7 Systems Analysis Object-Oriented Design.
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Systems Analysis and Design in a Changing World, Fifth Edition
Copyright by Dr. Clarence Lau, IVE(TY)
Slide 16B.51 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
1 Software Engineering Dr. K. T. Tsang Lecture 8 State modeling
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.
1 Analysis Extracting from Use Cases to Create Diagrams.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Lecture 14 & 15: Object- Oriented Analysis Anita S. Malik Adapted from Schach (2004) Chapter 12.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 Object-oriented and Structured 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.
IT 21103/41103 System Analysis & Design. Chapter 05 Object Modeling.
1 State Modeling  Events  States  Transitions and Conditions  State Diagrams  State Diagram Behavior  Practical Tips.
©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.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Slide 12.1 Object-Oriented and Classical Software Engineering Chapter 12 Object Oriented Analysis.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
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.
Petri Nets Invented by Carl Adam Petri in 1962 Concurrent systems with timing problems  Synchronization, race problem, deadlock A petri net consists of.
THE ANALYSIS WORKFLOW  The specification document  Informal specifications  The analysis workflow  Extracting the entity classes  Functional modeling:
Slide 12.1 © The McGraw-Hill Companies, 2007 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach.
CHAPTER 13 OBJECT-ORIENTED ANALYSIS. Overview l The analysis workflow l Extracting the entity classes l The elevator problem case study l The test workflow:
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Software Engineering Zhang Shuang
Winter 2011SEG Chapter 11 Chapter 1 (Part 1) Review from previous courses Subject 1: The Software Development Process.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
CHAPTER 12 OBJECT-ORIENTED ANALYSIS. Overview Extracting the entity classes Object-oriented analysis: The elevator problem case study Functional modeling.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
The Movement To Objects
Object Oriented Modeling and Design
Object-Oriented Analysis
Appendix A Object-Oriented Analysis and Design
Engineering Quality Software
Presentation transcript:

CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11

CS3320::CH112 OBJECT-ORIENTED ANALYSIS (OOA) Semi-formal specification technique Several methods –Booch, OMT, OOSE, Objectory--Essentially equivalent –Nowadays--represent OOA using UML (Unified Modeling Language)

CS3320::CH113 THE THREE STEPS OF OOA 1. Use-case Modeling –Determine how the various results are computed by the product (without regard to sequencing) –Largely action-oriented 2. Class Modeling (“Object Modeling”) –Determine the classes and their attributes –Purely data-oriented 3. Dynamic Modeling –Determine the actions performed by and to each class –Purely action-oriented

CS3320::CH114 Elevator Problem:OOA 1. Use-case Modeling Use cases: Describe the behavior of the system as seen from actor’s point of view. Actors: external entities that interact with the system (e.g. A system adm, a bank customer, a bank teller, a central database, etc.) A Scenario: a concise description of how an actor may interact with the system –a scenario is an instance of a use case

CS3320::CH Use-case Modeling Identify the actors Identify a list of "typical" scenarios to get insight into the system’s behavior Identify use-cases –a use-case specifies all possible scenarios for a given functionality. –a use case is initiated by an actor. –A use case represents a flow of events thru the system.

CS3320::CH116 Elevator Problem: OOA

CS3320::CH117 Normal Scenario

CS3320::CH118 Abnormal Scenario

CS3320::CH Object Modeling The object model describes the real-world object classes of the systems and their relationship to each other with an entity- relationship diagram It shows the static structure of the system. 1. Identify classes/objects 2. Identify associations between objects 3. Identify attributes of objects 4. Represent them using an entity-relationship diagram 5. Prepare a data dictionary

CS3320::CH1110 Identifying Object Classes An Object is an instance of a class that consists of –Data (attributes, state variables, instance variables, fields, data members) –Actions (methods, member functions) An object has a state (represented by data members) that changes during execution.

CS3320::CH1111 Identifying Object Classes Objects include physical entities (house, employees, button, etc.) and concepts (payment schedule, seating assignment, trajectory, etc.) Avoid computer implementation constructs (an array, a linked list, a binary tree, etc.) Don’t be concerned with operations at this points.

CS3320::CH1112 Identifying Object Classes Two approaches –Deduce from use cases and their scenarios often many scenarios too many candidate classes –Noun Extraction The two approaches are complementary

CS3320::CH1113 Noun Extraction Stage 1: Concise Problem Definition Define product in a single sentence Buttons in elevators and floors are to be used to control motion of n elevators in building with m floors. Stage 2: Incorporate constraints buttons illuminate when pressed to request elevator to stop at specific floor; illumination is cancelled when request has been satisfied. If elevator has no requests, it remains at its current floor with its doors closed.

CS3320::CH1114 Noun Extraction Stage 3: Identify nouns. Nouns: buttons, elevator, floor, movement, building, illumination, door floor, building, door are outside the problem boundary ==>excluded Movement, illumination are abstract nouns ==>excluded (may become attributes) Candidate classes: elevator, button Subclasses: Elevator button and floor button

CS3320::CH1115 Noun Extraction

CS3320::CH1116 Identify Associations An association is any dependency between two or more classes. Example: –Person works-for Company –User has Home Directory –Directory contains Files contains and part-of are special types of associations called aggregation Inheritance is also a special type of association.

CS3320::CH1117 Identifying Associations Problem statement –location phrases: next to, contained in, etc –communication: talk to –ownership phrases: has, part of –satisfaction of some condition: works for, married to, manages Some depend on knowledge of application domain.

CS3320::CH1118 Identifying Associations Example: Buttons in elevators and floors are to be used to control motion of n elevators in building with m floors. –Buttons control elevators –There are two types of buttons: floor buttons and elevator buttons –However, buttons do not really control elevator they simply communicate with it.

CS3320::CH1119 Identify Associations Identify association multiplicity: –1 to 1 –1 to many –Many to many Identify aggregations Identify inheritance relations

CS3320::CH1120 First Iteration of Class Model Problem: buttons do not communicate directly with elevator==> class Elevator Controller

CS3320::CH1121 Second Iteration of Class Model

CS3320::CH1122 Identify Attributes Attributes are properties of individual objects Problem Statement: –Correspond to nouns followed by possessive phrase: collar of the car, position of the cursor, salary of the employee, etc. Attributes are less likely to occur in statement of the problem. Knowledge of application domain. Try to get only the most important attributes at this stage. Others can be added later

CS3320::CH1123 Prepare Data Dictionary Write a paragraph describing each object class. Described the scope of the class within the current problem Describe associations and attributes Data dictionaries also include description of operations.

CS3320::CH1124 CRC Cards Used since 1989 for OOA For each class, fill in card showing –name of Class –Responsibility : functionality –Collaboration: list of classes it invokes

CS3320::CH1125 Elevator Controller--CRC 1. Turn on elevator button Totally unacceptable in OOA

CS3320::CH1126 Elevator Controller--CRC 1. Turn on Elevator Button Should be 1. Send message to Elevator Button to turn on button What about ? 5. Open elevator doors Note: Elevator doors have a state that changes during execution (class characteristic) ==> add class Elevator Doors

CS3320::CH1127 Elevator Controller--CRC

CS3320::CH Dynamic Modeling The dynamic model shows the time-dependent behavior of the system Aim: Produce a UML state diagram for each object class. A state diagram is less formal than an FSM –States, events, and conditions

CS3320::CH1129 States and Events The state of an object are defined by the values of its attributes. Objects change state when stimulated by other objects or external actors. A event is an individual stimulus from one object to another. The response to an event by the object receiving it can include a change of state or the sending of an another event (to the original object or another object)

CS3320::CH1130 Events An event is something that happens at a point in time: user depresses left-button, phone receiver lifted, call is routed, input string entered. An event has no duration: assumed to be instantaneous An event coveys information from one object to another –signal that something has occurred –Send data values: left mouse-button pushed (location)

CS3320::CH1131 Example Draw a state diagram for a phone line

CS3320::CH1132 Conditions A condition is a Boolean function of an object values. Example: –Temperature is below freezing –Floor button is lit –No cars on N/S left lanes A condition is valid over an interval of time Generally, a condition indicates the state of another object in the system.

CS3320::CH1133 Conditions Conditions are used as guards on transitions: –A transition fires when its event occurs, only if the guard condition is true –When you go out in the morning (event), if the temperature is below freezing (condition), then put on your gloves (next state)

CS3320::CH1134 Traffic Light Controller Straight N/S or W/E After N/S times-out, –if there are cars on N/S left lane, N/E left- turn signal is turned on –else straight W/E light is turned on Same for W/E left-lane

CS3320::CH1135 N/S may go straight N/S may turn left W/E may go straight W/E may turn left Time-out [cars in W/E left lane] Time-out [cars in N/S left lane] Time-out [No cars in N/S left lane] Time-out [No cars in W/E left lane]

CS3320::CH1136 Operations--Activities & Actions Operations are performed in response to states or events: Activity: an operation that takes time to complete. –Continuous operations: display a picture –Sequential operations that terminate after an interval of time: performing a computation, play a recorded message

CS3320::CH1137 Activities –An activity continues until complete or interrupted by an event that causes transition to a another state –e.g. ringing a telephone bell –Activities are associated with states State1 do: activity1 do: activity2

CS3320::CH1138 Operations--Activities & Actions Action: is associated with an event Instantaneous: duration is insignificant compared to the resolution of the state diagram –e.g. when callee hangs-up disconnect phone line Changing attribute values: –e.g. increment count when some event occurs.

CS3320::CH1139 Summary of Notation State 1 do: activity 1 do: activity 2 State 2 do: activity... Event [condition]/action

CS3320::CH1140

CS3320::CH1141 CASE Tools for OOA Phase Paradigm Plus Software through Pictures Rose