Esa-06 Ooad 2008 Web
Esa-06 Ooad 2008 Web
Design
Object-Oriented
Analysis and Design
IMSE1013
Henry Lau OOAD
An object Relationships
• Operations:
– Work • Static:
– Dance
– relations existing over a long time
– Drive
– objects know about each other existence
– Jump
• Attributes:
• Dynamic:
– Height – relations which two objects communicate
– Eye colour
with each other
– Hair colour – object sending stimuli to other
– Weight – stimuli - events, messages
‘Creating’ objects Encapsulation
• Composition - structure object from • A concept of ‘Self-containing’
parts
• Information hiding - ‘internal’ structure
• Partition - into hierarchy (‘is a’) is hidden from their surroundings
• Consist of - build objects from others • Behaviour and information is
represented or implemented internally
• Aggregate - to join together (‘has a’)
• Functionality and behaviour
characterised by ‘interfacing’
operations
Inheritance Inheritance
soldier navy
Why Inheritance? Limitations of SSADM
• Show similarities
• Treat data and function separately -
• Reuse common descriptions function/data oriented method
• ‘Software Reuse’ • More suited to classical hardware
• Easy modification of model by • More difficult to maintain and re-
performing modification in one place configure
• Method require more abstraction - not
• Avoid redundancy, leading to smaller too natural
and more efficient model, easier to
• Large semantic gap between external
understand
and internal view of a system
Object-Oriented
Object-Oriented Methods
Analysis & Design
• Advocate integral objects which encapsulate
both function and data
1. Finding objects
• Main activities include:
– Identification of objects, and 2. Organising objects
– Analysing their behaviour and information
• Uses object-oriented techniques and ideas:
3. Describing how objects interacts
– inheritance 4. Defining the operations of objects
– polymorphism
– function/data abstraction 5. Defining objects internally
Finding Objects Object-Oriented Design
• Naturally occurring entities - physical
• The objects found are to be implemented
• A concept of some abstract ideas - conceptual
• Once objects for a system are identified, they
• Should be stable are refined, organised and related
• Classes of objects • Classes that define the implementation are
– active/passive structured and consolidated
– temporary/permanent/persistent
• Classes are refined with implementation
– part/whole
details (e.g. OS, language, hardware, etc.)
– generic/specific
– private/public
• Classes are coded
• An OO methodology that
emphases on the identification
of objects - requirement
analysis ANALYSIS CONSTRUCTION TEST
2. Analysis model
3. Design model Classes OK
OK
5. Test model Analysis Model Design Model Implementation Model Test Model
Requirement -
Requirement Model
Use Case Model
• Capture the functional and non-
functional requirements uses
uses
Actor3
• Formalize the requirement Actor1 Use Case1
system behaviors
Actor2
Requirement Model Requirement Model
0..N
1..N 1
Class C GUI
Class D
Class Diagram - An Example Object Diagrams
GUI
0..N
GUI
1
FMC Workstation
L 1: Load NC Program
2: Start checking
1
1
4: Ready to Operate
1
3: Status OK
1 1 1
L
Machine Centre A
Robot Mechine Centre NC Machine