際際滷

際際滷Share a Scribd company logo
Lecture 13

 The Object
 An object can be defined as a tangible entity that exhibits
some well defined behavior. An object represents an
individual, identifiable item, unit, or entity, either real or
abstract, with a well defined role in the problem domain.
 The Class
 The template of an object. A class specifies an interface and
defines an implementation. The interface primarily consists
of the declaration of all the operations applicable to
instances of this class. The implementation of a class
primarily consists of the implementation of all the
operations defined in the interface of the class
Object Oriented Analysis and
Design

 Identity - An Identity can be sub-classed, to include
postal and email addresses, telephone numbers, images of
faces and logos, and so on.
 State - The state of an object encompasses all of the
properties of the object and their current values.
 Behavior - Behavior is how an object acts and reacts in
terms of its state changes and message passing. The
behavior of an object is completely defined by its actions.
An Object

 The object model presents a static view of the system
and illustrates how different objects collaborate with
one another through patterns of interaction.
 Inheritance Relationship
 Aggregation and Composition Relationship
 Association Relationship
Relationship Among Objects

 Inheritance defines a kind of hierarchy among classes.
By inheritance, we specify generalization/specialization
relationship among objects. In this relationship, a class
(called the subclass) shares the structure and behavior
defined in another class (called the superclass). A subclass
augments or redefines the existing structure and behavior
of its superclass. By classifying objects into groups of
related abstractions, we come to explicitly distinguish the
common and distinct properties of different objects,
which further help us to master their inherent complexity.
Identifying the hierarchy within a complex system
requires the discovery of patterns among many objects.
Inheritance Relationship

 The aggregation relationship defines part-of
structure among objects. When object A is part of the
state of object B, A is said to be contained by B. There
are some tradeoffs between aggregation and
association relationships. Aggregation reduces the
number of objects that must be visible at the level of
enclosing objects and may lead to undesirable tighter
coupling among objects.
Aggregation and Composition

 In an association relationship, when object A uses
object B, then A may send messages to B. The
relationship defines visibility among objects.
Association Relationship

More Related Content

Lecture 13

  • 2. The Object An object can be defined as a tangible entity that exhibits some well defined behavior. An object represents an individual, identifiable item, unit, or entity, either real or abstract, with a well defined role in the problem domain. The Class The template of an object. A class specifies an interface and defines an implementation. The interface primarily consists of the declaration of all the operations applicable to instances of this class. The implementation of a class primarily consists of the implementation of all the operations defined in the interface of the class Object Oriented Analysis and Design
  • 3. Identity - An Identity can be sub-classed, to include postal and email addresses, telephone numbers, images of faces and logos, and so on. State - The state of an object encompasses all of the properties of the object and their current values. Behavior - Behavior is how an object acts and reacts in terms of its state changes and message passing. The behavior of an object is completely defined by its actions. An Object
  • 4. The object model presents a static view of the system and illustrates how different objects collaborate with one another through patterns of interaction. Inheritance Relationship Aggregation and Composition Relationship Association Relationship Relationship Among Objects
  • 5. Inheritance defines a kind of hierarchy among classes. By inheritance, we specify generalization/specialization relationship among objects. In this relationship, a class (called the subclass) shares the structure and behavior defined in another class (called the superclass). A subclass augments or redefines the existing structure and behavior of its superclass. By classifying objects into groups of related abstractions, we come to explicitly distinguish the common and distinct properties of different objects, which further help us to master their inherent complexity. Identifying the hierarchy within a complex system requires the discovery of patterns among many objects. Inheritance Relationship
  • 6. The aggregation relationship defines part-of structure among objects. When object A is part of the state of object B, A is said to be contained by B. There are some tradeoffs between aggregation and association relationships. Aggregation reduces the number of objects that must be visible at the level of enclosing objects and may lead to undesirable tighter coupling among objects. Aggregation and Composition
  • 7. In an association relationship, when object A uses object B, then A may send messages to B. The relationship defines visibility among objects. Association Relationship