



































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




































Written by David Goodwin, based on the book Applying UML and Patterns (3rd^ ed.) by C. Larman (2005).
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
Package
Introduction to Object Orientation
Objects
Class
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
I (^) process of analysing a task (also known as a problem
domain)
I (^) finding and describing objects
I (^) typical:
I (^) set of use cases
I (^) one or more class diagrams
I (^) a number of interaction diagrams
I (^) defining software objects and how they collaborate to
fulfill the requirements. I (^) constraints to conceptual model produced in
object-oriented analysis I (^) Concepts in the analysis model are mapped onto
implementation classes and interfaces resulting in a
model of the solution domain.
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
I (^) Objects directly relate to real-world ‘entities’. I (^) An object has identity, state & behaviour.
I (^) Identity: the property of an object that distinguishes it
from other objects I (^) State: describes the data stored in the object
I (^) Behaviour: describes the methods in the object’s
interface by which the object can be used
I (^) The state of an object is one of the possible conditions
in which an object may exist. I (^) The state of an object is represented by the values of its
properties (attributes).
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
I (^) Identity:
I (^) Dog
I (^) Bicycle
I (^) State:
I (^) Dogs have state (name, color, breed, hungry)
I (^) Bicycles also have state (current gear, current pedal
cadence, current speed)
I (^) Behaviour:
I (^) Dogs have behaviour (barking, fetching, wagging tail)
I (^) Bicycles also have behaviour (changing gear, changing
pedal cadence, applying brakes)
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
I (^) Modularity:
I (^) The source code for an object can be written and
maintained independently of the source code for other
objects.
I (^) Information-hiding:
I (^) By interacting only with an object’s methods, the
details of its internal implementation remain hidden
from the outside world.
I (^) Code re-use:
I (^) If an object already exists, you can use that object in
your program.
I (^) Pluggability and debugging ease:
I (^) If a particular object turns out to be problematic, you
can simply remove it from your application and plug in
a different object as its replacement.
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
I (^) The fields cadence, speed,
and gear represent the
object’s state, and the
methods (changeCadence,
changeGear, speedUp etc.)
define its interaction.
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
I (^) Not a complete
application; it’s just
the blueprint for
bicycles that might be
used in an application.
The responsibility of
creating and using new
Bicycle objects belongs
to some other class in
your application.
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
I (^) public (+);
I (^) private (-);
I (^) protected (#).
I (^) Responsibilities often imply more than one operation.
I (^) A method is the implementation of an operation.
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface
Package
I (^) bi-directional, uni-directional, Aggregation (includes
Composition aggregation) and Reflexive.
I (^) For instance, a flight class is associated with a plane
class bi-directionally. Association represents the static
relationship shared among the objects of two classes.
Example: “department offers courses”, is an association
relation
Oriented Analysis & Design
Introduction to Object Orientation
Objects
Class Attributes Operations Associations Aggregation Composition
Inheritance
Dependency
Multiplicity
Polymorphism
Encapsulation
Interface