Date post: | 30-Dec-2015 |
Category: |
Documents |
Upload: | edith-pierce |
View: | 223 times |
Download: | 3 times |
2003 SJSU -- CMPE L2-S1 Modeling
Advanced Object-Oriented Analysis & Design
Dr. M.E. Fayad, Professor
Computer Engineering Department, Room #283I
College of Engineering
San José State University
One Washington Square
San José, CA 95192-0180
http://www.engr.sjsu.edu/~fayad
2003 SJSU – CMPE ---- M.E. Fayad L2-S2 Modeling
2
Lesson 2:Modeling
2003 SJSU – CMPE ---- M.E. Fayad L2-S3 Modeling
Lesson Objectives
Objectives
3
Understand modeling Why we model? Discuss model essentials Explore different models Understand the differences
between a method and a process Understand the differences
between multiple models and
multiple views
2003 SJSU – CMPE ---- M.E. Fayad L2-S4 Modeling
Define:
– Standards
– Methodologies
– Method & Process
– Model & View
– Tools
– Environments
4
Definitions
2003 SJSU – CMPE ---- M.E. Fayad L2-S5 Modeling
Standards imply regulations, guidelines, rules, laws, and so on.
Standards can dictate named methodologies, such as IEEE standards or DOD standards (Ex: DOD-STD-2167A).
A standard alone is not sufficient on getting a task completed. Why?
5
Standards
[Fayad-Laitinen 1998]
2003 SJSU – CMPE ---- M.E. Fayad L2-S6 Modeling
Because standards focus on the attributes of the results instead of how the results will be achieved
A standard also includes a type, model, or example commonly or generally accepted or adhered to, such a criterion set for usage or practices (moral standards)
Standards applies to some measure, principle, model, and so on, with which things of the same class are compared to determine their quantity, value, quality, and so forth (standards of purity in drugs)
6
Standards
[Fayad-Laitinen 1998]
2003 SJSU – CMPE ---- M.E. Fayad L2-S7 Modeling
A methodology is “a science of method or orderly arrangement” Webster.
A methodology is used to refer to the very highest level of the way we do things.
A methodology also refers to “a system of methods, as in particular science”
The methodology we will consider here cover only the development of software applications.
7
Methodology
[Fayad-Laitinen 1998]
2003 SJSU – CMPE ---- M.E. Fayad L2-S8 Modeling
A method implies a regular, orderly, logical procedure for doing something, such as a method of finding software requirements.
Exs: Waterfall model, spiral model [Boehm84], and fountain model [Henderson-Selers90].
Jacobson defines a method as a planned procedure by which a specific goal is approached step by step [Jacobson92].
Examples of software design method are a set of work procedures, a set of notations, or a set of heuristics.
8
Methods or Techniques
2003 SJSU – CMPE ---- M.E. Fayad L2-S9 Modeling
Software engineering methods can be divided into three major categories:
1. Process-Oriented Methods [Yourdon89]
2. Data-Oriented Methods [Martin90]
3. Object-Oriented Methods [Fayad93, Rumnaugh91, etc..]
9
Methods or Techniques
2003 SJSU – CMPE ---- M.E. Fayad L2-S10 Modeling
10
POM vs. OOM
Procedural
Self-Disciplined
Unconstrained
Free-Form
Object-Oriented
Teamwork
Rigorous
Standardized
2003 SJSU – CMPE ---- M.E. Fayad L2-S11 Modeling
11
Method Provides Foundation for Software Engineering
Step-By-Step Process
Notation That SymbolizesObject-Oriented Principles
Communication Medium ForNon-Programmers
Framework For ModelingThe Program
Standards For TransitioningThe Problem BetweenSoftware Engineers
Requirements
PreliminaryDesign
DetailedDesign
Code andUnit Test
Integration andSystem Testing
Maintenance
pac k age Fac toria l_Pac k age is s ubty pe Argument_SubTy pe is In teger range 0 .. In teger' Las t; s ubty pe Res ul t_SubTy pe is In teger range 1 .. In teger' Las t;
func tion Fac toria l_Of (Value : Argument_Subty pe) re turn Res ul t_Subty pe;
end Fac toria l_Pac k age;
SoftwareReqmts
SpecSoftwareDesign
Document
SoftwareDesign
Document
SoftwareChangeProposal
2003 SJSU – CMPE ---- M.E. Fayad L2-S12 Modeling
12
The Myth of the Single Software Development Method
FIDO
Requirements Such AsSizeReliabilitySafetyCostScheduleMaintainability
Require DifferentMethodsToolsQuality AssuranceMaterialsPersonnelDocumentation
2003 SJSU – CMPE ---- M.E. Fayad L2-S13 Modeling
13
How Many OO Methods Exist?
.
UML
2003 SJSU – CMPE ---- M.E. Fayad L2-S14 Modeling
14
Engineering Process Hierarchy
Engineering
Computer Electronics
SoftwareHardware
SASD OOT
UML
Scientific Area
Standards
Methodologies(Macrodevelopment Processes)
Techniques (Methods)(Minidevelopment Processes)
Processes(Microdevelopment Processes
OMT
Identify Classes
IdentifyAttributes
2003 SJSU – CMPE ---- M.E. Fayad L2-S15 Modeling
15
Processes are Important for a new OO Teams New methods and tools introduce confusion Processes define exactly who, what, when, and how
– “big-picture”
x x xx x
o o o
o
o
x
x
oo
o
x
Big Play
x x xx xo o o oo
x
x
oo o
x
Long Kick
2003 SJSU – CMPE ---- M.E. Fayad L2-S16 Modeling
16
Method vs. Process
Processes take OO methods out of the classroom and put them to workProcesses take OO methods out of the classroom and put them to work
• Theoretical
• Ideas
• Predictions
• Practical
• Concrete Actions
• Metrics
2003 SJSU – CMPE ---- M.E. Fayad L2-S17 Modeling
17
Defined Processes are Baseline for Improvements
Can’t improve anything that you can’t repeat
.
Planned vs. Actual Budget
500
1000
1500
2000
2500
3000
3500
Hou
rs
J an Feb Mar Apr M ay J un J ul Aug Sep
Planned
Ac tual
Automated Testing Process
Improved Processes Metric Feedback
Tem per at ureTr ansducer s
M odel3. 2.1. 4. 11
Tem perat ur eTr ansducers
I nter face3. 2.2. 9
I ce Det ectorM odel
3. 2.1. 4.14
Ai r Dat a U nitM odel
3. 2.1. 4.1
Modify_OAT_WAT_Diff
OAT_WAT_Dif f
U p da t e_ T e mp _T r nd c rs
Mach_NumberS ta t ic _ P re s su r e
Measured_OAT_WAT_Diff
Measur ed_OAT_WAT_Diff
Updat e_I ce_Detect or
OAT_WAT_Dif f_Voltage
Temp_Tr ndcrs_BIT_State
T e m p _ Tr n dc r s_ S t at e
Measur ed_St at ic_Pressur e
Measur ed_St at ic_Pressur e
O bje c t In te rac tio n D iagr am ( O ID )
Technology Infusion
Process Improvements
SoftwareDevelopmentProcesses
UPDATED
SoftwareDevelopmentProcesses
2003 SJSU – CMPE ---- M.E. Fayad L2-S18 Modeling
18
Software Process Hierarchy
.
Projects
Software Pro cess
Software Pro cess
Pro
jec
t 2
Software Pro cess
Pro
jec
t 3
Pro
jec
t 2
Pro
jec
t 1
3
XYZ Company
SoftwareEngineeringGuidebooksManual
Company2Industry /Government1
Software Engineering Institute
CapabilityMaturity Modelfor Software
FEDERALSTANDARD
FAA - 178A
DoD-STD-2167A
MILITARYSTANDARD
2003 SJSU – CMPE ---- M.E. Fayad L2-S19 Modeling
19
General Processes Must be Tailored to Your Projects
SQAReviewer
Reader
Designer
PreliminaryDesign
Reviewer
Moderator
S/W TechLead
ReworkPerfor m furt her r ework of th e
deta iled design. Prese nt minorrewor k to SQA Reviewer and
major rewor k to S/ W Tech Lea d.
Are allminor defects
reworked?
Are al lmajor defects
reworked ?
Follow-UpInfo rm de signer that de taileddesign passed in spection.Add specificat io n units int o
curr ent CM S libr ary.
Yes
Yes
No
No
SoftwareEngineeringPracticesManual
Detailed ProcessesDependent on:
General
Specific
Application Area Methods Tools Language
Software Inspection Process
2003 SJSU – CMPE ---- M.E. Fayad L2-S20 Modeling
20
Identifying Appropriate Process Details
Cost effective range– depends upon environment– specifies “who”, “what”, “when”– reference “how”
Too Much• not cost effective
• typically too much “why”
Not Enough• useless
• typically only “what”
2003 SJSU – CMPE ---- M.E. Fayad L2-S21 Modeling
21
Modeling Model building is a well established human tradition, e.g.
Ancient Egyptian built models for their pyramids and temples
Early ship builders produced physical models for the British Admiralty
Building plans
Electronic schematics
Physics
2003 SJSU – CMPE ---- M.E. Fayad L2-S22 Modeling
Building a model is a well-established human process.
A model is a description of something.
Models allow us to answer questions about a real thing before we build it.
Models capture only those features deemed essential by model builders for their goals.
A single thing might be represented by multiple model.
Models can be validated.
22
Modeling – Definition
Any single thing can be represented by a large number of models
2003 SJSU – CMPE ---- M.E. Fayad L2-S23 Modeling
To communicate the desired structure and behavior of the system
To visualize the system’s architecture To better understand the system we are building To serve as a template that guide us in
constructing a system To expose opportunities for simplification and
reuse To document the decisions made To manage risk 23
Objectives of Modeling
2003 SJSU – CMPE ---- M.E. Fayad L2-S24 Modeling
Modeling
– A central part of all the activities that lead up to the
deployment of good software.
Model
– A simplification of reality
– Provides the blueprint of a system
24
Modeling and Model
2003 SJSU – CMPE ---- M.E. Fayad L2-S25 Modeling
The best models are connected to reality
No single model is sufficient. Every nontrivial
system is best approached through a small set
of nearly independent models
25
Principles of Modeling
2003 SJSU – CMPE ---- M.E. Fayad L2-S26 Modeling
26
Model Essentials Simple
Complete (most likely to be correct)
Stable to technological changes
Testable
Easy to understand
Visual or graphical
[Fayad98]
2003 SJSU – CMPE ---- M.E. Fayad L2-S27 Modeling
27
Modeling in this Course
In this course, we will focus on the job of modelers:
How they collect facts/requirements about the application domain from different sources
How they prepare models of the application domain
How they limit their modeling activities
How they create one or more models of the target system
How they use models to create blueprints and architect software
How they test and validate their models
2003 SJSU – CMPE ---- M.E. Fayad L2-S28 Modeling
27
Summary: Models Serve Several Purposes
Testing a physical entity before building it
Communication with customers
Visualization
Reduction of complexity
2003 SJSU – CMPE ---- M.E. Fayad L2-S29 Modeling
29
Modeling Classifications [1]
Tangible
– Physical
– Examples
• Mall
• Aircraft
Intangible
– Logical
– Examples
• Flowcharts
• STDs
• DFDs
2003 SJSU – CMPE ---- M.E. Fayad L2-S30 Modeling
30
Modeling Classifications [2]
Static
– Object models
– Domain models
– DFDs
Dynamic
– Behavior models
• Flowcharts
• Petri-Net
– Three properties:
Control, Behavior, Time
2003 SJSU – CMPE ---- M.E. Fayad L2-S31 Modeling
31
Modeling Classifications [3]
Object Model (class diagram)
Control Model (STDs, FlowCharts, Activity Diagrams, OIDs)
Transformation Model (DFDs)
2003 SJSU – CMPE ---- M.E. Fayad L2-S32 Modeling
32
Modeling Classifications [4]: UML Static
• Type diagrams, CRC cards, use case Model, use case diagrams, and class diagrams
Dynamic or Behavior
• Activity diagrams, collaboration diagram, sequence diagram, and state diagram
Implementation
• Component diagram & deployment diagram
2003 SJSU – CMPE ---- M.E. Fayad L2-S33 Modeling
33
Multiple Models vs. Multiple Views UML has 9 different models.
This called “multiple models” and represents:
– Abstraction, what and how, etc.
It is not “multiple views”
Multiple view represents:
– Presentations
– Levels, layers, slices, details
– Scalability, accessibility, authorization, information hiding, dimensions
2003 SJSU – CMPE ---- M.E. Fayad L2-S34 Modeling
34
Tools: Select Tools to Meet Specific Needs
Correct Tool For The JobMaximum Benefit FromRealistic Expectations
Simple Tools Can OftenBe Invaluable
WARNING:All Tools Are Not Equal!
Wrong Type Of Tool For Job
Frustrates Users
Seldom Ends In Success
Underpowered Tool
Reduces ConfidenceIn CASE Technology
Often Arise FromUnrealistic Expectations
Overpowered Tool
Wastes Money and Time
May Be Inflexible
STOP
2003 SJSU – CMPE ---- M.E. Fayad L2-S35 Modeling
What are the differences between multiple models and multiple views?
T/F
– UML stands for United Modeling Level.
– Use case diagrams are behavior models.
– Data flow diagrams are tangible models.
– Decision tables are control models.
– Petri nets are static models
– Software design is part of UML.
What are the properties of software process?
What are the essential properties of the model?35
Discussion Questions (1)
2003 SJSU – CMPE ---- M.E. Fayad L2-S36 Modeling
Define: Static models, dynamic models, transformation models
What are the differences between a method and a process?
What are the differences between tangible and intangible modeling?
Identify examples of tangible modeling in system development
Identify examples of intangible modeling in system development
“System development is model building.” Please describe.
“Models serve several purposes.” Please describe.
Essay Topic 1: Multiple Models vs. Multiple Views
Essay Topic 2: Mapping from models to views 36
Discussion Questions (2)
2003 SJSU – CMPE ---- M.E. Fayad L2-S37 Modeling
Discuss the following guidelines
– Go Beyond the Problem Domain
– Speculate About Likely Changes
– Separate General Functionality from Specific Policy
– Object should have Cohesive Interfaces
– Objects Should Be Intelligent Agents
– Objects Should Export Services
– Avoid “Object Machismo”
37
Questions for the Next Lecture
2003 SJSU – CMPE ---- M.E. Fayad L2-S38 Modeling
Task 1: Problem Statement for team projects are needed (see sample problems on OOPSLA – DesignFest). This is due on the third week of the semester.
Task 2: Identify the team members of your team. Select a team name and e-mail me, the team name, team’s members’ names, their e-mails, phone numbers -- Immediately.
Task 3: Think about extra assignments and writing essays. E-mail me if you like to start right away.
Please note that problem statements must be submitted electronically as MS Word format. 38
Tasks for Next Lecture