Beruflich Dokumente
Kultur Dokumente
Software Engineering:
A Practitioner's Approach, 5/e
copyright 1996, 2001
Chapter 20
Object-Oriented Concepts
and Principles
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
identify
candidate
classes
RiskAnalysis
look-up
classes
in library
construct
nth iteration
of system
extract
classes
if available
put new
classes
in library
Custom
er
Evaluation
Engineering,
Construction&Release
engineer
classes
if unavailable
OO analysis
OO design
OO programming
OO testing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
The OO Mindset
objects
problem domain
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
Key Concepts
classes and class hierarchies
instances
inheritance
abstraction and hiding
objects
attributes
methods
encapsulation
polymorphism
messages
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
Classes
object-oriented thinking begins with the
definition of a class often defined as:
template
generalized description
pattern
blueprint ... describing a collection of similar
items
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
Building a Class
class name
attributes:
operations
attributes:
operations:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
What is a Class?
occurrences
things
roles
organizational units
places
structures
external entities
class name
attributes:
operations:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
Encapsulation/Hidin
The object encapsulates
g
both data and the logical
procedures required to
manipulate the data method
#1
data
method
#2
method
#6
method
#5
method
#4
Class Hierarchy
furniture (superclass)
table
chair
desk
"chable"
subclasses of the
furniture superclass
instances of chair
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
10
Methods
(a.k.a. Operations, Services)
An executable procedure that is
encapsulated in a class and is designed
to operate on one or more data attributes
that are defined as part of the class.
A method is invoked
via message passing.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach,
5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001
11
sender object
Messages
attributes:
receiver object
attributes:
operations:
operations:
message:
[sender, return value(s)]
12