Oo Concepts

12
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Supplementary Slides for Supplementary Slides for Software Engineering: Software Engineering: A Practitioner's Approach, 5/ A Practitioner's Approach, 5/ copyright © 1996, 2001 R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY for student use at the university le when used in conjunction withSoftware Engineering: A Practitioner Any other reproduction or use is expressly prohibited. This presentation, slides, or hardcopy may NOT be used fo short courses, industry seminars, or consulting purposes

description

Oo Concepts

Transcript of Oo Concepts

1
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
 Supplementary Slides forSupplementary Slides for Software Engineering:Software Engineering:
A Practitioner's Approach, 5/eA 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 withSoftware Engineering: A Practitioner's Approach. Any other reproduction or use is expressly prohibited.
 
2
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
Chapter 20Chapter 20 Object-Oriented ConceptsObject-Oriented Concepts
and Principlesand Principles
3
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
The OO Process ModelThe OO Process Model
Customer Communication
4
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
The OO MindsetThe OO Mindset
problem domainproblem domain
5
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
Key ConceptsKey Concepts
•objectsobjects  – attributesattributes  – methodsmethods  – encapsulationencapsulation  – polymorphismpolymorphism
6
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
ClassesClasses •object-oriented thinking begins with theobject-oriented thinking begins with the
definition of a class often defined as:definition of a class often defined as:  –  templatetemplate
 –  generalized descriptiongeneralized description
 –  ““blueprint” ... describing a collection of similarblueprint” ... describing a collection of similar itemsitems
•a metaclass (also called a superclass)a metaclass (also called a superclass) is a collection of classesis a collection of classes
 
7
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
Building a ClassBuilding a Class class name
attributes:
operations:
attributes:
operations
8
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
What is a Class?What is a Class?
external entities
9
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
Encapsulation/HidinEncapsulation/Hidin ggThe object encapsulates
both data and the logical procedures required to manipulate the data
 Achieves “information hiding”
10
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
Class HierarchyClass Hierarchy
chairtable desk "chable"
instances of chair
 
11
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
MethodsMethods (a.k.a. Operations, Services)(a.k.a. Operations, Services)
 
12
These courseware materials are to be used in conjunction withSoftware Engineering: A Practitioner’s Approach,  5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
MessagesMessages sender object