Académique Documents
Professionnel Documents
Culture Documents
Software Construction
Lecture 2
10/26/16
Software Construction
Lecture 2
Perspectives on Software
Engineering:
Quality of Software
10/26/16
Software Construction
Lecture 2
10/26/16
Software Construction
Lecture 2
Software Construction
Lecture 2
Software Construction
Lecture 2
10/26/16
Software Construction
Lecture 2
10/26/16
Software Construction
Lecture 2
10/26/16
Software Construction
Lecture 2
10
10/26/16
Software Construction
Lecture 2
11
10/26/16
Software Construction
Lecture 2
12
Model
What is a model?
a model is a simplification of reality
Why do we model?
we build models so that we can better understand
the system we are developing
we build models of complex systems because we
cannot comprehend such a system in its entirety
four aims to achieve
10/26/16
Lecture 2
14
Modeling
One Practical Tool:
UML
10/26/16
Software Construction
Lecture 2
15
10/26/16
Software Construction
Lecture 2
16
10/26/16
Software Construction
Lecture 2
17
10/26/16
Software Construction
Lecture 2
18
Analysis
Model UML
Function
Class diagram
Object diagram
Data
Object
Behavior
State-chart diagram
Interaction diagram
Relationship
own
own
Automobile
Make
Model
Body type
Price
Color
own
Person
Birthday
Height
Weight
Expertise
Association: Multiplicity
Unspecified
1
Exactly one
Zero or more (many, unlimited
0..*
1..*
One or more
Zero or one
0..1
2..4
Specified range
Multiple, disjoint ranges 2, 4..6
Object
models
Object = entity + operations
Object models describe the system in terms of object classes
An object class is an abstraction over a set of objects with common
attributes and the services (operations) provided by each object
Various object models may be produced
Inheritance models
Aggregation models
Interaction models
10/26/16
Software Construction
Lecture 2
23
Asssociation and
Aggregation
Association
Is a Relationship between objects.
Objects have independent lifecycles.
There is no owner.
Objects can create and delete independently.
Aggregation
Aggregation differs from ordinary composition in that it does not
imply ownership.
In composition, when the owning object is destroyed, so are the
contained objects.
In aggregation, this is not necessarily true. For example, a
university owns various departments (e.g., chemistry), and each
department has a number of professors. If the university closes, the
departments will no longer exist, but the professors in those
departments will continue
toConstruction
exist. Therefore, a University can be
Software
10/26/16
24
Lecture 2
seen as a composition of departments,
whereas departments have
10/26/16
Software Construction
Lecture 2
25
10/26/16
Software Construction
Lecture 2
26
Inheritance Model
10/26/16
Software Construction
Lecture 2
27
Functional
Modeling: Data Flow
Diagram
Every computer-based
system is an
information transform ....
input
computer
based
system
output
Level 0
10/26/16
Software Construction
Lecture 2
30
Level 1
10/26/16
Software Construction
Lecture 2
31
10/26/16
Software Construction
Lecture 2
32
Basic Concept
10/26/16
Software Construction
Lecture 2
33
EXAMPLE
10/26/16
Software Construction
Lecture 2
34
A Harel statechart
10/26/16
Software Construction
Lecture 2
35
10/26/16
Software Construction
Lecture 2
36
10/26/16
Software Construction
Lecture 2
37