Module 1: Introduction To OOAD: (Object-Oriented Analysis and Design)
Module 1: Introduction To OOAD: (Object-Oriented Analysis and Design)
Why OO?
What is OOAD?
How to do OOAD?
“The "software crises" came about when people realized the major problems in
software development were not algorithmic, but were caused by communication
difficulties and the management of complexity” [Budd]
Communication & complexity about the problem and the solution, all expressed in terms of concepts in a language!
But then, What is CONCEPT? [Martin & Odell]
Consider Human Growth & Concept Formation
stage concepts
infant the world is a buzzing confusion
very young age "blue" "sky“ (individual concepts)
"blue sky“ (more complex concept)
hypothesis: humans possess an innate
capacity for perception
But, What is CONCEPT? [Martin & Odell] [Novak, 1984, Cambridge University Press]
A "concept" is an idea or notion that we apply to the things, or objects, in our awareness
Abstraction
Focus on the essential
Focus on what an object “is and does”
Omits tremendous amount of details
Encapsulation
a.k.a. information hiding
Objects encapsulate:
state as a collection of instance variables
behavior as a collection of methods invoked by
messages
Class Car
Attributes
Model
Location
Operations
Start
Accelerate
What is OBJECT?
A "concept" is an idea or notion that we apply to the things, or objects, in
our awareness
A structure that
- has identity (i.e., discrete and distinguishable), and
- bundles together attributes (the data part, or state) and behavior (the
function/code part).
It is an instance of a collective concept, i.e., a class.
What is CLASS?
a collection of objects that share common properties, attributes, behavior and semantics, in
general.
A collection of objects with the same data structure (attributes, state variables) and
behavior (function/code/operations) in the solution space.
A blueprint or definition of objects.
A factory for instantiating objects.
The description of a collection of related components.
Classification
Grouping of common objects into a class
Instance.
An object created by a class.
Instantiation.
The act of creating an instance.
Cf. Containment.
Objects that contain other objects as components.
• Specialization
The act of defining one class as a refinement of another.
• Subclass
A class defined in terms of a specialization of a superclass
using inheritance.
• Superclass
A class serving as a base for inheritance in a class hierarchy
• Inheritance
Automatic duplication of superclass attribute and behavior
definitions in subclass.
What is generalization? What is over-generalization?
What is STATE?
"State" is a collection of association an object has with other
objects and object types.
What is EVENT?
An "event" is a noteworthy change in state.
Data Data
message
Fn Fn
Data Data
Fn Fn
Data
Fn
Quality Assurance
Requirements Analysis
Project Planning
Maintenance
Architectural Design
Detailed Design
Implementation
Release
OO Design
(Booch) design then
program
Fusion
Hewlett Packard
Recommended Process and Models
ObjectSpace best practices
Larman’s experiences
The Rational Unified Process (RUP)
Rational; Booch, Jacobson, and Rumbaugh
Why
Software Crisis due to Communication and Complexity
Languages, Concepts, Models
OO for Conceptual Modeling
Historical Perspective of Modeling Paradigms
What
Fundamental OO Concepts
How
Design patterns & OO development processes
Knowledge Databases
Representation (in A.I.) Emphasis in Persistent Data
So, let us try to Communicate well and Conquer the complexity well
Experience shows:
DEFINING THE "PROBLEM" (analysis) is THE "PROBLEM“
ARCHITECTURAL DESIGN (the highest level of solution) can, literally, make it or break it (high-
level design)
So, let us try to Communicate well and Conquer the complexity well
about analysis and design!
But still, what kind of language can alleviate difficulties with communication &
complexity well about the analysis and the design, and suited well to the divide
and conquer methodology?
Programming Paradigms
Imperative Procedures & Algorithms
Function-oriented Mathematical functions
Logic-oriented Goals, predicate logic
Object-oriented Classes & Objects
Rule-oriented Expert systems
Constraint-oriented Invariant relations
From Functional
Functions as building blocks (fn: Input -> Output)
Algorithmic perspective
E.g., Lisp
To Object-Oriented
Objects as building blocks.
Conceptual perspective
from the vocabulary of the problem space for analysis
from the vocabulary of the solution space for design
Fn
D ata Data
Fn
Data
U pda tedChart R ea d
e.g., Structure
Object-Oriented Languages
Smalltalk, C++, Java
G lo b a l D a ta
G
Fortran II, Algol, Cobol
S u b r o u tin e s
Lawrence Chung CS6359.OT1: Module 1 38
3rd Generation Object Oriented
Data Data
Fn Fn
Data
Fn
G lo b a l D a ta
Allocation of functionality to objects
Shift from monolithic to decentralized control
PL/I, Pascal Object-Oriented Programming Languages (OOPL)
Abstract Class.
An incomplete superclass that defines common
parts.
Not instantiated.
Concrete class.
Is a complete class.
Describes a concept completely.
Is intended to be instantiated.
What is OPERATION?
An "operation" is a process that can be requested as a unit.
It is the mechanism for state change (i.e., event).
- Behavior across different kinds of objects
What is MESSAGE?
- specify what behavior receiver objects need to perform
- details of how to perform are left up to the receiver
- state information is accessed via messages
What is METHOD?
- specify how operations are to be carried out (hence implements a message)
- must have access to data
- can manipulate data directly
- Specific implementation of an operation by a certain class
Data
setGrade()
Fn
getGrade()
In-state Student
payTuition ()
Out-of-State
Student