schach5-chap01-14[1]
-
Upload
hsiangliu4806 -
Category
Documents
-
view
218 -
download
0
Transcript of schach5-chap01-14[1]
-
8/14/2019 schach5-chap01-14[1]
1/29
Slide 1.1
The McGraw-Hill Companies, 2002
Object-Oriented andClassical Software
Engineering
Fifth Edition, WCB/McGraw-Hill, 2002
Stephen R. [email protected]
-
8/14/2019 schach5-chap01-14[1]
2/29
Slide 1.2
The McGraw-Hill Companies, 2002
CHAPTER 1
SCOPE OFSOFTWARE ENGINEERING
-
8/14/2019 schach5-chap01-14[1]
3/29
Slide 1.3
The McGraw-Hill Companies, 2002
Outline
q Historical aspects
q Economic aspects
q Maintenance aspects
q Specification and design aspects
q Team programming aspects
q The object-oriented paradigm
q Terminology
-
8/14/2019 schach5-chap01-14[1]
4/29
Slide 1.4
The McGraw-Hill Companies, 2002
Scope of Software Engineering
q Historical Aspects
1968 NATO Conference, Garmisch
Aim: to solve the Software Crisis
Software is delivered
Late Over budget
With residual faults
-
8/14/2019 schach5-chap01-14[1]
5/29
Slide 1.5
The McGraw-Hill Companies, 2002
Scope of Software Engineering (contd)
q Why cannot bridge-building techniques
be used to build operating systems?
Attitude to collapse
Imperfect engineering
Complexity Maintenance
-
8/14/2019 schach5-chap01-14[1]
6/29
Slide 1.6
The McGraw-Hill Companies, 2002
Conclusion
q Software Engineering is not Engineering
-
8/14/2019 schach5-chap01-14[1]
7/29
Slide 1.7
The McGraw-Hill Companies, 2002
Economic Aspects
q Economically viable techniques
q Coding method CMnew is 10% faster than currently
used method CMold. Should it be used?
Common sense answer
Of course!
Software Engineering answer
Consider the effect of CMnew on maintenance
-
8/14/2019 schach5-chap01-14[1]
8/29
Slide 1.8
The McGraw-Hill Companies, 2002
Maintenance Aspects
q Software Life Cycle
The way we produce software, including
The life-cycle model
The individuals
CASE tools
-
8/14/2019 schach5-chap01-14[1]
9/29
Slide 1.9
The McGraw-Hill Companies, 2002
Life-cycle model
1. Requirements phase
2. Specification phase
3. Design phase
4. Implementation phase
5. Integration phase (in parallel with 4)
6. Maintenance phase
7. Retirement
-
8/14/2019 schach5-chap01-14[1]
10/29
Slide 1.10
The McGraw-Hill Companies, 2002
Approximate Relative Cost of Each Phase
q 19761981 data
q Maintenance constitutes 67% of total cost
-
8/14/2019 schach5-chap01-14[1]
11/29
Slide 1.11
The McGraw-Hill Companies, 2002
Comparative Relative Cost of Each Phase
-
8/14/2019 schach5-chap01-14[1]
12/29
Slide 1.12
The McGraw-Hill Companies, 2002
Good and Bad Software
q Good software is maintainedbad software
is discarded
q Different types of maintenance
Corrective maintenance [about 20%]
Enhancement Perfective maintenance [about 60%]
Adaptive maintenance [about 20%]
q Effect of CMnew on maintenance
-
8/14/2019 schach5-chap01-14[1]
13/29
Slide 1.13
The McGraw-Hill Companies, 2002
Specification and Maintenance Faults
q 60 to 70 percent of faults are specification
and design faults
q Data of Kelly, Sherif, and Hops [1992]
1.9 faults per page of specification
0.9 faults per page of design 0.3 faults per page of code
q Data of Bhandari et al. [1994]
-
8/14/2019 schach5-chap01-14[1]
14/29
Slide 1.14
The McGraw-Hill Companies, 2002
Specification and Maintenance Faults (contd)
q Faults at end of the design phase of the
new version of the product
13% of faults from previous version of product
16% of faults in new specifications
71% of faults in new design
-
8/14/2019 schach5-chap01-14[1]
15/29
Slide 1.15
The McGraw-Hill Companies, 2002
Cost to Detect and Correct a Fault
-
8/14/2019 schach5-chap01-14[1]
16/29
-
8/14/2019 schach5-chap01-14[1]
17/29
Slide 1.17
The McGraw-Hill Companies, 2002
The Object-Oriented Paradigm
q The structured paradigm had great successes
initially It started to fail with larger products (> 50,000 LOC)
q Maintenance problems (today, up to 80% ofeffort)
q Reason: structured methods are Action oriented (finite state machines, data flow
diagrams); or
Data oriented (entity-relationship diagrams,
Jacksons method); But not both
-
8/14/2019 schach5-chap01-14[1]
18/29
Slide 1.18
The McGraw-Hill Companies, 2002
The Object-Oriented Paradigm (contd)
q Both data and actions are of equal importanceq Object:
Software component that incorporates both dataand the actions that are performed on that data
q Example: Bank account
Data: account balance
Actions: deposit, withdraw, determine balance
-
8/14/2019 schach5-chap01-14[1]
19/29
Slide 1.19
The McGraw-Hill Companies, 2002
Structured versus Object-Oriented Paradigm
q Information hidingq Responsibility-driven design
q Impact on maintenance, development
-
8/14/2019 schach5-chap01-14[1]
20/29
Slide 1.20
The McGraw-Hill Companies, 2002
Key Aspects of Object-Oriented Solution
q Conceptual independence
Encapsulation
q Physical independence
Information hiding
q Impact on development Physical counterpart
q Impact on maintenance
Independence effects
-
8/14/2019 schach5-chap01-14[1]
21/29
Slide 1.21
The McGraw-Hill Companies, 2002
Responsibility-Driven Design
q Also called Design by Contract
q Send flowers to your aunt in Iowa City
Call 1-800-FLOWERS
Where is 1-800-FLOWERS?
Which Iowa City florist does the delivery? Information hiding
q Object-oriented paradigm
Send a message to a method [action] of an object
-
8/14/2019 schach5-chap01-14[1]
22/29
Slide 1.22
The McGraw-Hill Companies, 2002
Transition From Analysis to Design
q
Structured paradigm: Jolt between analysis (what) and design (how)
q Object-oriented paradigm:
Objects enter from very beginning
-
8/14/2019 schach5-chap01-14[1]
23/29
Slide 1.23
The McGraw-Hill Companies, 2002
Analysis/Design Hump
q Systems analysis
Determine what has to be done
q Design
Determine how to do it
Architectural designdetermine modules Detailed designdesign each module
-
8/14/2019 schach5-chap01-14[1]
24/29
Slide 1.24
The McGraw-Hill Companies, 2002
Removing the Hump
q Object-oriented analysis
Determine what has to be done
Determine the objects
q Object-oriented design
Determine how to do it Design the objects
-
8/14/2019 schach5-chap01-14[1]
25/29
Slide 1.25
The McGraw-Hill Companies, 2002
In More Detail
q Objects enter here
-
8/14/2019 schach5-chap01-14[1]
26/29
Slide 1.26
The McGraw-Hill Companies, 2002
Warning
q Do not use the object-paradigm to enhance a
product developed using the structured paradigm Water and oil do not mix
q Exception: if the new part is totally disjoint
Example: adding a GUI (graphical user interface)
-
8/14/2019 schach5-chap01-14[1]
27/29
Slide 1.27
The McGraw-Hill Companies, 2002
Terminology
q Quality
q Program, system, product
q Methodology, paradigm
q Method and technique
q Client, developer, user
q Bug A bug crept into the code
instead of I made a mistake
-
8/14/2019 schach5-chap01-14[1]
28/29
Slide 1.28
The McGraw-Hill Companies, 2002
Object-Oriented Terminology
q Data component of an object
State variable
Instance variable (Java)
Field (C++)
Attribute (generic)q Action component of an object
Member function (C++)
Method (generic)
-
8/14/2019 schach5-chap01-14[1]
29/29
Slide 1.29Object-Oriented Terminology (contd)
q C++: A member is either an
Attribute (field), or a
Method (member function)
q Java: A field is either an
Attribute (instance variable), or a Method