You are on page 1of 17

Object-Orientation?

Object-Oriented
What is Object-
Object-Orientation & Object-
Object-
Analysis and Design Oriented (OO) Methods? (C++, Java,
Oracle??)
(OOAD) What is OO methods used for?
What are the features of OO methods?
IMSE1013 How are they different from SSADM?
Henry Lau

Intro to IS - OOAD 2

Object-Oriented Methods How?


A technique for system modelling Using object-orientation as a
A technique to manage complexity inherent in
analysis, design, and implementation base, we model a system as a
For the analysis and design of system number of objects that
Provide integrated view of hardware and interacts.
software
Provide a methodology for system
development

Intro to IS - OOAD 3 Intro to IS - OOAD 4


Is It Any Good? Some Qualities of OO
A system which is designed and modelled using Understanding of system is enhanced, as
an object-
object-oriented technology is: the semantic gap is reduced
Easy to understand
Modification to the model tend to be local
Directly related to reality - semantic gap as they often result from an individual
Natural partitioning of the problem item, which is represented by a single
More flexible and resilient to change object
Systems can be developed more rapidly and at Ideally suited to model real systems,
systems, and
a lower cost
simulating systems
Intro to IS - OOAD 5 Intro to IS - OOAD 6

Some Examples of Using OO OO Methods


Object technology is key to re-
re-engineering Object-
Object-Oriented Design (OOD) - Booch (1983),
business process at Xerox pioneering but not quite scalable
Space telescope uses OO technology and Object-
Object-Oriented System Analysis (OOSA) -
Shlaer & Mellor (1988), essentially information
Booch Method to build interface to Hubble
analysis based on data modelling
Database
Object-
Object-Oriented Analysis (OOA) - Coad &
British Airways choose OO tools for airline Yourdon (1991), a method for developing OO
applications system model

Intro to IS - OOAD 7 Intro to IS - OOAD 8


OO Methods (cont.) OO Methods (cont.)
Object Modelling Technique (OMT) - Jacobson Use Case - Jacobson et al.
Rumbaugh et al. (1991), entity/relationship (1992), requirement modelling,
modelling, analysis
modelling with extension to model classes, and design; also known as OOSE
inheritance and behaviour Unified Modelling Language (UML) -
Hierarchical Object-
Object-Oriented Design Booch,
Booch, Rumbaugh,
Rumbaugh, Jacobson
(HOOD) - ESA (1989), architectural design (1997/2000), a method that provides a
for Ada code united OO approach to system
development
Intro to IS - OOAD 9 Intro to IS - OOAD 10

Object-Oriented Modelling OO Modelling


Attach the behaviour and information
that is important to objects
Associate relations between object to
describe the static and dynamic
organisation and structure of real
situation Tree
Next to
House
Live in Drives Car

Henry

Intro to IS - OOAD 11 Intro to IS - OOAD 12


The Basics An Object
Objects Some concept of reality
Classes A physical entity
Relationships It is characterised by:
An Instance a number of operations,
Idea of encapsulation a state which remembers the effect of
these operations

Intro to IS - OOAD 13 Intro to IS - OOAD 14

An Object Relationships
Operations:
Work Static:
Static:
Dance relations existing over a long time
Drive objects know about each other existence
Jump Dynamic:
Dynamic:
Attributes: relations which two objects communicate with
Height each other
Eye colour object sending stimuli to other
Hair colour stimuli - events, messages
Weight

Intro to IS - OOAD 15 Intro to IS - OOAD 16


Consist of Relation
Is a Relation

Intro to IS - OOAD 17 Intro to IS - OOAD 18

Creating Objects Encapsulation


Composition - structure object from A concept of Self-
Self-containing
containing
parts Information hiding - internal
internal structure is
hidden from their surroundings
Partition - into hierarchy (is a)
Behaviour and information is represented
Consist of - build objects from others or implemented internally
Aggregate - to join together (has a) Functionality and behaviour characterised
by interfacing
interfacing operations

Intro to IS - OOAD 19 Intro to IS - OOAD 20


Class Instance
A class represents a template for several An instance is an object created from a
objects and describes how these objects class
are structured internally A class describes the behaviour and
Objects of the same class have the same information structure of an instance, while
the current state of the instance is defined
definition both for their operations and by the operations performed on the
their information structure instance
Class is an implementation of objects System
Systems behaviour is performed via the
interactions between instances
Intro to IS - OOAD 21 Intro to IS - OOAD 22

Key Concepts Polymorphism


Polymorphism same object has A concept in type theory
different implementations A common name may denote instances
of different classes
Inheritance to adopt, permutate, One type of operation can be implemented
and derive from some generic in different ways by different classes
objects Overloading in modern OO language

Intro to IS - OOAD 23 Intro to IS - OOAD 24


Why Polymorphism Inheritance
A very strong tool for allowing system If class B inherits class A, then both
designers to develop flexible systems operations and the information
Designer only need to specify what shall structure described in class A will
occur and not how it shall occur become part of class B
To add an object, the modification will only
affect the new object, not those using it

Intro to IS - OOAD 25 Intro to IS - OOAD 26

Inheritance Why Inheritance?


Show similarities
Reuse common descriptions
Mannal

Software Reuse
Reuse
Man Dog Easy modification of model by performing
modification in one place
Avoid redundancy,
redundancy, leading to smaller and
soldier navy more efficient model, easier to
understand
Intro to IS - OOAD 27 Intro to IS - OOAD 28
Limitations of SSADM Object-Oriented Methods
Treat data and function separately - Advocate integral objects which encapsulate
function/data oriented method both function and data
More suited to classical hardware Main activities include:
Identification of objects, and
More difficult to maintain and re-
re-configure
Analysing their behaviour and information
Method require more abstraction - not too
Uses object-
object-oriented techniques and ideas:
natural inheritance
Large semantic gap between external and polymorphism
internal view of a system function/data abstraction

Intro to IS - OOAD 29 Intro to IS - OOAD 30

Object-Oriented
Finding Objects
Analysis & Design
Naturally occurring entities - physical
1. Finding objects A concept of some abstract ideas - conceptual
Should be stable
2. Organising objects Classes of objects
active/passive
3. Describing how objects interacts temporary/permanent/persistent
4. Defining the operations of objects part/whole
generic/specific
5. Defining objects internally private/public

Intro to IS - OOAD 31 Intro to IS - OOAD 32


Object-Oriented Design Organising Objects
The objects found are to be implemented Classification
Once objects for a system are identified, they
are refined, organised and related
Similar objects - inheritance: is a
Classes that define the implementation are Interactions/relationships between objects
structured and consolidated
Whole/Part relationship: has a
Classes are refined with implementation details
(e.g. OS, language, hardware, etc.)
Classes are coded

Intro to IS - OOAD 33 Intro to IS - OOAD 34

Object Interactions Objects Functionality


Identify how objects fit into a system Operations performed by an object
Use of scenarios - unique situations Behaviour of an object
Objects
Objects communication
Specification of interfaces, external and
internal functions
Objects
Objects interfaces Objects with complex functionality should
Refined relationships be partitioned into simpler objects

Intro to IS - OOAD 35 Intro to IS - OOAD 36


Object Implementation Object Implementation
The specification of CLASSES
Define information that an object METHODS:
encapsulates - ATTRIBUTES and METHODS Specify external functions
Specify internal functions that are not
Automobile
seen or usable by others objects
Languages: C++, Smalltalk, Ada,
Colour
Made

Travel
SoundHorn
OpenSunRoof
Eiffel, Modula-2, Simula, Java++

Intro to IS - OOAD 37 Intro to IS - OOAD 38

Testing of Objects OO Methods - Some Advantages


Similar to SSADM Reduce semantic gap between domain
(the actual) and model (the design)
Unit/Integration/System tests
Closer to reality e.g. classification of
Validation and verification objects close to how human understand
1. Cross references surroundings
2. Object diagrams Easier to understand and maintain
3. Simulation of classes Easier to modify (e.g. polymorphism)

Intro to IS - OOAD 39 Intro to IS - OOAD 40


The Jacobson Use Case Method
Jacobson Use Case An OO methodology that emphases on
the identification of objects - requirement
Method analysis
Based on 3 techniques:

(OOSE) 1. Conceptual modeling


2. Block design
3. Object-
Object-oriented programming

Intro to IS - OOAD 41 Intro to IS - OOAD 42

Model Building with JM Jacobson Method


The development cycle is organized into
five models:
1. Requirement model
ANALYSIS CONSTRUCTION TEST 2. Analysis model
3. Design model
Requirement Model Design Model Test Model
Analysis Model Implementation Model 4. Implementation model
5. Test model

Intro to IS - OOAD 43 Intro to IS - OOAD 44


System Development Requirement Model
Capture the functional and non-
non-functional
Requirement (Use Case) Model
requirements
Realised by Implemented by Tested in
Formalize the requirement
Structured by

Identify and document essential system


entities
Identify and document essential system
Classes OK

OK

Failed behaviors
Analysis Model Design Model Implementation Model Test Model

Intro to IS - OOAD 45 Intro to IS - OOAD 46

Requirement -
Requirement Model
Use Case Model
Actors:
uses
Essential system entities
uses from an user view point
Actor3
Actor1 Use Case1 Interacts with system
Changes system behavior
Use Case2
Control system
uses Actor1 functionality
System

Actor2
Intro to IS - OOAD 47 Intro to IS - OOAD 48
Requirement Model Analysis Model
System - define the Structure a system
boundary independently to the
Data2

Use Case1 Use Cases: actual implementation


System scenarios
System behaviors Interface1
Control1 Capture information,
Use Case2
Unique transaction
behavior and
between actors and presentation
System
the system
Data1 Specify objects
User point of view Interface2

Intro to IS - OOAD 49 Intro to IS - OOAD 50

Design Model Implementation Model


Refine the object structure to the chosen The blocks in the design model are
implementation environment implemented using classes
Objects are consolidated into blocks
blocks - Class diagrams are used to express
abstracted classes relationships between classes
Blocks interactions are also documented Class specifications
using interaction diagrams Annotated source code (pseudo-
(pseudo-code) for
methods and attributes of classes

Intro to IS - OOAD 51 Intro to IS - OOAD 52


Class Diagrams - Inheritance Class Diagram - Aggregation
Class A
Type Class A
Type
'has a'
CheckStatus() CheckStatus()
persistent persistent
1

1
Class B
Type
1..N 1
Class C
CheckStatus
Class D
GenerateReport()
persistent

Intro to IS - OOAD 53 Intro to IS - OOAD 54

Class Diagram - Uses Class Diagram - An Example


GUI
Class A
Type 0..N

CheckStatus()
persistent 1
FMC Workstation

1
1 1

0..N
1 1 1
GUI
Robot Mechine Centre NC Machine

Intro to IS - OOAD 55 Intro to IS - OOAD 56


Object Diagrams Test Model
States the method and result of testing
GUI
Test specification describe how classes
L 1: Load NC Program and system are to be tested
2: Start checking
4: Ready to Operate Test results document outcome of the
3: Status OK
tests executed
L
Machine Centre A Verification and validation

Intro to IS - OOAD 57 Intro to IS - OOAD 58

System Analysis and Design


Requirement Analysis
with Jacobson
Generate requirement model with actors,
and use cases identified
1. Requirement Analysis STEP 1: System context diagram
2. Functional Analysis and Design STEP 2: Identify principal actors (external
and internal)
STEP 3: Construct use cases
STEP 4: Represent actors and use cases
with a use case actor diagram
Intro to IS - OOAD 59 Intro to IS - OOAD 60
Functional Analysis & Design Analysis and Design
Structure system functionality into objects STEP 1: Identify scenarios from use cases
To distribute the behavior of the use cases STEP 2: Associate actors and use cases to
among objects - analysis model scenarios
Create objects that are common to actors or use STEP 3: Produce event lists for scenarios
cases STEP 4: Identify primary object types
Identify the responsibilities of objects STEP 5: Consolidate objects into control, entity
Identify the relationships between objects and interface
STEP 6: Identify and represent relationships

Intro to IS - OOAD 61 Intro to IS - OOAD 62

Forces in Software
Unified Modeling Cost
Functionality
Compatibility

Language (UML) Capacity Fail safe

Availability Fault tolerance

Performance Throughput

Technology Resilience

The challenge over the next 20 years will not be speed or cost or
performance; it will be a question of complexity.
Bill Raduchel, Chief Strategy Officer, Sun Microsystems

Our enemy is complexity, and its our goal to kill it.


Intro to IS - OOAD 63 Jan Baan Intro to IS - OOAD 64
The Value of UML History of UML
UML 1.3
Is an open standard OMG Acceptance, Nov 1997
Final submission to OMG, Sep 97 UML 1.1
Supports the entire software development public First submission to OMG, Jan 97
feedback
lifecycle UML partners UML 1.0
Supports diverse applications areas Web - June 96 UML 0.9
Is based on experience and needs of the
OOPSLA 95 Unified Method 0.8
user community
Supported by many tools
Other methods Booch method OMT OOSE

Intro to IS - OOAD 65 Intro to IS - OOAD 66

A model is a complete Graphical Tools


Overview of the UML description of a system
from a particular
perspective State
The UML is a language for Use Case
State
Diagrams
Class
Diagrams
Use Case Diagrams State
visualizing Use Case
Use Case
Diagrams
Use Case
Diagrams State
Diagrams
Object
Diagrams
Sequence Diagrams Diagrams
Diagrams Diagrams
specifying Diagrams

constructing
Scenario State
documenting Scenario
Diagrams
Collaboration
Diagrams Models
State
Diagrams
Component
Diagrams
Diagrams Diagrams
the artifacts of a software-
software-intensive system
Scenario Component
Scenario
Diagrams
Component
Diagrams
Deployment
Statechart
Diagrams Diagrams
Diagrams Diagrams
Activity
Diagrams
Intro to IS - OOAD 67 Intro to IS - OOAD 68

You might also like