Chapter 20 Object-Oriented Concepts and Pricinples
Overview
This chapter provides an introduction to object-oriented programming and
management principles for object-oriented projects. Object-oriented software
engineering process is similar to that found in the rapid prototyping or spiral
paradigms. Even though, object-oriented software engineering follows the same
steps as the conventional approach (analysis, design, implementation, and
testing) it is harder to separate them into discrete activities. The next 3
chapters deal with the topics of object-oriented analysis, object-oriented
design, and object-oriented testing.
Evolutionary Object-Oriented Process Model
- Customer communication
- Planning
- Risk analysis
- Engineering construction and analysis
- Identify candidate classes
- Look-up classes in library
- Extract classes if available
- Engineer classes if not available
- Object-oriented analysis (OOA)
- Object-oriented design (OOD)
- Object-oriented programming (OOP)
- Object-oriented testing (OOT)
- Put new classes in library
- Construct Nth iteration of the system
Object-Oriented Concepts
- Objects - encapsulates both data (attributes) and data manipulation
functions (called methods, operations, and services)
- Class - generalized description (template or pattern) that describes a
collection of similar objects
- Superclass - a collection of objects
- Subclass - an instance of a class
- Class hierarchy - attributes and methods of a superclass are inherited by
its subclasses
- Messages - the means by which objects exchange information with one
another
- Inheritance - provides a means for allowing subclasses to reuse existing
superclass data and procedures; also provides mechanism for propagating
changes
- Polymorphism - a mechanism that allows several objects in an class
hierarchy to have different methods with the same name (instances of each
subclass will be free to respond to messages by calling their own version of
the method)
Advantages of Object-Oriented Architectures
- Implementation details of data and procedures and hidden from the outside
world (reduces the propagation of side effects when changes are made).
- Data structures and operators are merged in single entity or class (this
facilitates reuse)
- Interfaces among encapsulated objects are simplified (system coupling is
reduced since object needs not be concerned about the details of internal data
structures)
Class Construction Options
- Build new class from scratch without using inheritance
- Use inheritance to create new class from existing class contains most of
the desired attributes and operations
- Restructure the class hierarchy so that the required attributes and
operations can be inherited by the newly created class
- Override some attributes or operations in an existing class and use
inheritance to create a new class with (specialized) private versions of these
attributes and operations.