CSE4006 Software Engineering Analysis Modeling Scott Uk-Jin Lee Division of Computer Science, College of Computing Hanyang University ERICA Campus 1 st Semester 2018
Overview of Analysis Modeling 1. 2. 3. 4. 5. 6. 7. 8. 2
Requirement Analysis (Operational) (constraints) 1. 2. 3. 3
Requirement Analysis - (user scenarios) - (functional activities) - - - 4
A Bridge 5
Elements of Analysis Model 6
Rules of Thumb 1. 2. - (information domain) - (function and behavior of system) 3. 4. coupling 5. 6. 7
Domain Analysis ( ),, the identification, analysis, and specification of common, reusable capabilities within a specific application domain, in terms of common objects, classes, subassemblies, and frameworks...,,,,, - Donald Firesmith 8
Domain Analysis 9
Data Modeling (processing) - UML external entities : printer, user, sensor things : reports, displays, signals occurrences or events : interrupt, alarm roles : manger, engineer, salesperson organizational units : division, team places : manufacturing floor structure : employee record 10
Data Modeling,, (composite information) (encapsulate) Entity Relationship Diagram (ERD) 11
Object-Oriented Concepts (element) : (operation) (instantiation) (inheritance) 12
Classes :,, ( ) superclass, 13
Methods (Operations, Services) (executable procedure) (data attributes) 14
Encapsulation / Hiding (logical procedure) (information hiding) 15
Class Hierarchy 16
How to Define All Classes 1. (communicate) 2. 3. 4. 5. 6. 1 ~ 6 17
Elements of Analysis Model 18
Scenario-based Modeling Use-cases are amply an aid to defining what exists outside the system (actors) and what should be performed by the system (use-cases) Use-cases (actors) (use-cases) - Ivar Jacobson 1.? 2.? 3.? 4.? 19
Use-Cases (thread of usage) actor (users) use-case actor? actor,,? actor? 20
Use-Cases 21
Activity Diagram (procedural flow) use-case Business Process modeling Notation (BPMN) [order reject] Receive Order Fill Order [order accepted] Ship Order Close Order Send Invoice Invoice Make Payment Accept Payment 22
Swimlane Diagram use-case 23
Activity & Swimlane Diagram 24
Elements of Analysis Model 25
Class-based Modeling : (objects) (operations: methods or services) ( ) : (classes), (objects), (attributes), (operations) CRC collaboration diagrams & packages 26
Identifying Analysis Classes (grammatical parse) (analysis class) (attributes) (operations) 27
Analysis Classes external entities : other systems, devices. people things : reports, displays, letters, signals occurrences or events : / property transfer, completion of series of robot movement roles : manager, engineer, salesperson organizational units : division, group, team places : (context) manufacturing floor, loading dock structures : sensors, four-wheeled vehicles, computers 28
Selecting Classes - Criteria (potential classes) (analysis classes) : 1. retained information 2. needed service 3. multiple attributes 4. common attributes 5. common operations 6. essential requirements potential class ( ) 29
Example : Potential SafeHome Classes 30
Class Diagram 31
CRC Models Class-Responsibility-Collaborator (CRC) (analysis classes) (responsibility) (analysis classes) (collaborators), 32
CRC Models CRC 33
Class Types in CRC Modeling entity classes (model / business classes) (problem statement) ) FloorPlan, Sensor boundary classes ) interactive screen, printed reports, CameraWindow controller classes - : entity / boundary - entity (communication) 34
Responsibilities in CRC Modeling (intelligence) smart vs. dumb (generally) ( ) (information) (behavior) (encapsulation) (localized), 35
Collaborators in CRC Modeling 2 : (relationships) 3 : is-part-of has-knowledge-of depends-upon 36
Composite Aggregate Class is-part-of = UML aggregation 37
Association & Dependencies UML : (association) (analysis classes) - (multiplicity) (cardinality) (dependency) (analysis classes) client-server client server ( ) 38
Multiplicity 39
Dependencies (dependency) (stereotype) (stereotype) UML (<< >>) 40
Analysis Packages (use-case, analysis class) + (plus) : (analysis class) - (minus) : # (sharp) : 41
Reviewing the CRC Model (CRC ) CRC (subset) ( ) use-case scenario ( use-case diagram) use-case, ( ) use-case use-case ( CRC ) 42
Elements of Analysis Model 43
Flow-oriented Modeling : Data Flow Diagram (DFD) / ( ) 44
The Flow Model = 자료원 프로세스 자료도착지 45
The Flow Model Notation (process) (external entity) : ( ) ),,, (external entity) : (origin) (sink) ),,, 46
The Flow Model Notation (Data Flow) (Data Store) : : 47
Data Flow Diagram Example : Bread Factory DFD 48
Data Flow Diagram Example : Bread Factory ( : 2) 49
Data Flow Diagramming : Guidelines (labeling) DFD context level (level 0) (top-down) (external entity) level 0 (labeling) DFD final level (procedural logic) 50
Data Flow Diagramming : Guidelines ) 51
Constructing a DFD (operations) (grammatical parse) (external entity) : level 0 DFD 52
Constructing a DFD (narrative) (grammatical parse) ( ) & ( ) (balance) level 1 DFD ( 1:5 ) 53
Constructing a DFD Example : SafeHome SafeHome processing narrative The SafeHome security function enables the homeowner to configure the security system when it its installed, monitors all sensors connected to the security system, and interacts with the homeowner through the Internet, a PC, or a control panel. During installation, the SafeHome PC is used to program and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system, and telephone number are input for dialing when a sensor event occurs. 54
Constructing a DFD Example : SafeHome [level 1] SafeHome (refinement) 55
Constructing a DFD Example : SafeHome [level 2] Monitor sensors (refinement) 56
Flow Modeling Notes (process) (one thing) DFD (external entity) level 0 (flow model) 3 ~ 7 data dictionary 57
Flow Model Components Data Flow Diagram Data Dictionary Process Specification (Mini-Spec) 58
Data Dictionary (data item) = = composed of { } repetition ( ) optional + and [ / ] or address = house no. + (street / area) + city + state course ID = course no. + name + level + grades 59
Process Specification (PSPEC) level (flow model) 60
Elements of Analysis Model 61
Behavioral Modeling (behavioral model) (events) (stimuli) : use-cases (interaction sequence) use-case (state diagram) - 62
What are Events? Event = a type of observable occurrence (interaction) (instances) synchronous object operation invocation (call event) asynchronous signal reception (signal event) creation and destruction of instances occurrence of time instants (time event) interval expiry calendar/clock time change in value of some entity (change event) 63
Behavioral Modeling (states) (characterization) : (behavior) (behavior) (transition) : (action) state / sequence 64
State Diagram (active state) 65
State Diagram Example SafeHome control panel class 66
Sequence Diagram 67
Sequence Diagram Example SafeHome 68