You are on page 1of 12

Supplementary Slides for

Software Engineering:
A Practitioner's Approach, 5/e
copyright 1996, 2001

R.S. Pressman & Associates, Inc.


For University Use Only
May be reproduced ONLY for student use at the university level
when used in conjunction with Software Engineering: A Practitioner's Approach.
Any other reproduction or use is expressly prohibited.
This presentation, slides, or hardcopy may NOT be used for
short courses, industry seminars, or consulting purposes.
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

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

The OO Process Model


Planning
Custom
er
Communication

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

a metaclass (also called a superclass)


is a collection of classes
once a class of items is defined, a
specific instance of the class can be
defined

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

Achieves information hiding


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

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)]

message: [receiver, operation, parameters]


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

12

You might also like