Documente Academic
Documente Profesional
Documente Cultură
Outline
Object Oriented Concepts and principals Object Oriented Analysis Object Oriented Design
Introduction
We live in a world of objects Object-Oriented view is an abstraction that models the world in ways that help us to better understand and navigate it OO approach was first proposed in the late 1960s As time passes, object technologies are replacing classical software development approaches. Why? Object technologies lead to reuse, OO software is easier to maintain, to adapt, and to scale.
OO Paradigm
For many years, the term OO was used to denote a software development approach that used one of a number of OO programming languages(e.g. Ada 95, C++, Eiffel, Smalltalk) Today, the OO paradigm encompasses a complete view of software engineering Although any one of process models, could be adapted for use with OO, the best choice would be an evolutionary process model
Planning
Customer Evaluation
OO Concepts
Classes and class hierarchies
Instances Inheritance Abstraction and hiding
Objects
Attributes Methods Encapsulation Polymorphism
Messages
Object
The object encapsulates both data and the logical procedures required to manipulate the data method
#1
data
method #2
Polymorphism
It is a characteristic that greatly reduces the effort required to extend an existing OO system. Polymorphism enables a number of different operations to have the same name. For example: drawing different type of graphs( e.g. Line, Pie, Histogram ) It decouples objects from one another making each more independent. General class graph and one subclass for each type.
Messages
sender object attributes:
operations:
Modeling Dimensions
Identification/classification of entities. General-to-specific and whole-to-part entity relationships The modeling 3. Other entity relationships dimensions 8 and 9 are always present with SA. 4. Description of attributes of entities 5. Large-scale model partitioning 6. States and transitions between states 7. Detailed specification for functions 8. Top-down decomposition 9. End-to-end processing sequences 10. Identification of exclusive services 11. Entity communications (via messages or events) 1. 2.
The most widely use were: The Booch method ( an evolutionary approach is maintained). The Rumbaugh method (Object modeling technique (OMT)) The Jacobson method (OO Software Engineering (OOSE)) The Coad and Yourdon method (One of the easiest) The Wirfs-Brock method (do not make clear distinction between
design and analysis tasks)
Domain Analysis
OO Analysis can occur at many different levels of abstraction:
At the business or enterprise level At the business area level At an application level
OOA at the middle level called Domain Analysis. Domain Analysis is performed to create a library of reusable classes applicable to an entire category of applications. Using a robust class library produces the system faster, cheaper and more reliable. But where did such a library come from? By applying domain analysis.
class taxonomies SOURCES OF DOMAIN KNOWLEDGE technical literature existing applications customer surveys expert advice current/future requirements DOMAIN ANALYSIS reuse standards functional models domain languages DOMAIN ANALYSIS MODEL
Once the scenario of usage has been defined, the modeling of the software begins. A series of techniques may be used to gather basic customer requirements.
Use Cases
OOD
OOD transforms the analysis model created using OOA into a design model that serves as a blueprint for software construction. OOD results in a design that achieves a number of different levels of modularity. Subsystems: Major system components. Objects: Data and the operations. Four important software design concepts:
Abstraction Information Hiding Functional Independence Modularity
OOD
The subsystem layer: Representation of each of the subsystems that enable the software to achieve its customer defined requirements. The class and object layer: The class hierarchies, (generalization) and representation of objects. The message layer: The design details of communication of each object with its collaborators. (external and internal interfaces) The responsibilities layer: Data Structure and algorithmic design for all attributes and operations.
res
s ib ilities es i
es s d es i cl ss d d es i
b jec t
s b s y s t em d esi
OOA to OOD
A t tr ib u t es , o p erat i o n s , c o llab o rato r s CRC In d ex C ar ds O bjec t relat io n s h ip m o d el
res p o n s ib il ities d es ig n
U s e c as es
m es s ag e d es i g n C l as s an d o b je c t d es i g n s u b s y s t em d es i g n
O b jec t -B eh av io r M odel
OOA to OOD
n aly s is M o d el c l as s es at tr ib u t es m th o d s r ela t io n s h iip s p b e h a v io r D e s iig n M o d el g o b jec t s d ata s tr u c t u r es alg o r it h m s m es s ag in g in c o n tr o l
Design Issues
decomposabilitythe facility with which a design method helps the designer to decompose a large problem into subproblems that are easier to solve; composabilitythe degree to which a design method ensures that program components (modules), once designed and built, can be reused to create other systems; understandabilitythe ease with which a program component can be understood without reference to other information or other modules; continuitythe ability to make small changes in a program and have these changes manifest themselves with corresponding changes in just one or a very few modules; protectiona architectural characteristic that will reduce the propagation of side affects if an error does occur in a given module.
System Design
client subsystem request server subsystem contract
Subsystem Example
Control panel subsystem Sensor subsystem
request for system status specification of type of alarm periodic status check
request for alarm notification periodic check-in require for configuration update
Object Design
A protocol description establishes the interface of an object by defining each message that the object can receive and the related operation that the object performs An implementation description shows implementation details for each operation implied by a message that is passed to an object.
information about the object's private part internal details about the data structures that describe the objects attributes procedural details that describe operations
Design Patterns
add some example