Professional Documents
Culture Documents
OBJECT ORIENTED ANALYSIS AND DESIGN Introduction
OBJECT ORIENTED ANALYSIS AND DESIGN Introduction
AN OVERVIEW OF OBJECT_ORIENTED
SYSTEMS DEVELOPMENT
Introduction
• Many heuristics for object identification and analysis, which help with
initial abstraction and object modeling.
• Data modeling approach (ER modeling)
• Models an object relationship network with subclasses.
• State-transition specifications are constructed for each object and
functions are modeled with data-flow diagrams.
• Produces a composite activity-data model (synthesis not clearly
specified)
• Lack of support for inheritance.
• Underspecified in the design phase.
Object-Oriented Systems Analysis
(OOSA) – Object Relationship Model
Object Oriented Methods – Object-
Oriented Analysis (OOA)
• Covers all OO concepts, although analysis method
only.
• Classification and inheritance are modeled and
abstraction is helped by the structure layer (Subject,
Structure, Attribute, Service)
• Uses hierarchical inheritance.
• Specification of encapsulation and object interfaces
is not as detailed as OOSD, or HOOD.
• Overall, it does meet many OO criteria.
Object-Oriented Analysis (OOA) –
Object Model in the Service Layer
Object Oriented Methods –
ObjectOry
• Developed by Jacobson.
• Supports OO concepts of classification, encapsulation and
inheritance.
• Abstraction is promoted by levels.
• Adds “use cases” to the OO approach.
• Composite data and activity definition is not strongly enforced and
services are also regarded as objects.
• Reuse is supported by component libraries.
• Guidance for analysis is less comprehensive.
• Target applications: like HOOD real-time systems and engineering
systems.
Summary of Object Oriented Methods
Examples:
• Dog
• Attributes: breed, color, hungry, tired, etc.
• Behaviors: eating, sleeping, etc.
• Bank Account
• Attributes: account number, owner, balance
• Behaviors: withdraw, deposit
Software Objects
Writing software often involves creating a computational model
of real-world objects and processes.
number: 054
number: 036
balance: $941
Encapsulation
When classes are defined, programmers can specify that
certain methods or state variables remain hidden inside the
class.
These variables and methods are Visible Methods
accessible from within the class, but not
Hidden
accessible outside it. State
The combination of collecting all the
Variables
and
attributes of an object into a single class Methods
definition, combined with the ability to hide
some definitions and type information Visible Variables
within the class, is known as
encapsulation.
Class
Definition
Graphical Model of an Object
Instance balance()
variables
Methods
accountNumber()
Account
class • A class variable defines an attribute of an entire class.
variable count: 3
• In contrast, num:
an instance
printCount bal: $19
054
variable defines
bal: $240
num: 036
num: 712 an attribute
bal: $941
of a
single instance of a class.
Class ()
method
Inheritance
Examples:
Generic Class for Terrier is
Terrier can be defined as a Dog derived
With general from Dog
subclass of Dog. attributes and
Specific Class for
SavingsAccount and
behaviors for all
dogs. Terrier
CheckingAccount can be With new attributes
and behaviors
derived from the Account specific to the
class (see following slides). Terrier breed.
New Account Types - Cont’d
Suppose we define SavingsAccount and CheckingAccount
as two new subclasses of the Account class.
class SavingsAccount
class Account { extends Account {
method acctNum() method rate() {…}
{…} }
method balance()
{…}
class CheckingAccount
method deposit()
extends Account {
{…}
method withdraw() method withdraw()
{…}
{…}
}
}
Account New Account
SavingsAccountTypes - Cont’d
CheckingAccount
rate() withdraw()
Manager Employee
Message
To: Employee
Method: getHired
Parameters: salary = $45,000, start_date =
10/21/99
Benefits of Messages
• Sequential
• Waterfall method, Structured Analysis & Design
• Iterative, Spiral and Recursive Methods
• There are a huge variety of these
• “Agile” or “LightWeight” Software Methods fit into this class
• Parallel Effort
• Unmanaged, Chaotic
Analysis and Design Space
Analysis and Design Space - Cont’d
Module Map
• Key Object-Oriented Systems Concepts
• Basic Software Lifecycle Concepts
• Introduction to OOA/OOD
• Scenarios and Use Cases
• CRC’s
• Sequence Diagrams
• Class Diagrams
• UML Models
Use Cases
Parent Class:
CRC Card Layout
Subclasses:
Responsibilities:
Sequence Diagrams