Docsity

Object-Oriented Analysis and Design (OOAD): Object Model, Lecture notes of Object Oriented Analysis and Design

Partial preview of the text

Download Object-Oriented Analysis and Design (OOAD): Object Model and more Lecture notes Object Oriented Analysis and Design in PDF only on Docsity!

What is Object?

๏ƒ˜ a tangible and/or visible thing

๏ƒ˜ something that may be

apprehended intellectually

๏ƒ˜ something toward which thought

or action is directed

Object

๏ƒ˜ has state

๏ƒ˜ exhibits some well-defined behavior

๏ƒ˜ has a unique identity

An object has state, behavior and identity;

the structure and behavior of similar objects

are defined in their common class; the terms

instance and object are interchangeable

State

Tabulate typical input sequences: three nickels nickel, dime dime, nickel two dimes two nickels, dime

state diagram

Inputs: N, D, reset

Output : open

Rese t

N

N

N

D

D

N D

[ope n]

[ope n] [ope n] [ope n]

S

S1 S

S3 S4^ S5 S

S [ope n]

S

D

Vending Machine : suitable abstract representation

Object vs simple value

๏ƒ˜simple quantity as number 3 ๏ƒž

atemporal, unchangeable, and non-

instantiated

๏ƒ˜object ๏ƒž exist in time, are changeable,

have state, are instantiated, and can be

created, destroyed, and shared.

Behavior The state of an object represents the cumulative results of its behavior.

Operation Types

Modifier : alters the state of an object Selector : accesses the state of an object does not alter the state Iterator : permits all parts of an object to be accessed in well-defined order Constructor : creates an object and initializes its state Destructor : frees the sate of an object and/or destroys the object itself

active object : own thread of control, passive object

Object Model - Evolution

๏ƒ˜ focus shift : programming-in-the-small to

programming-in-the-large

๏ƒ˜ high-order programming languages

๏ƒ˜ imperative language : tell the computer

what to do

๏ƒ˜ ๏ƒž declarative language : describe the key

abstractions in the problem domain

Topology โ€“ 1

Data

Sub- program

(First and early second generation)

Relatively flat physical structure Global data and sub-programs

Topology โ€“ II

Data

Subprogram

(Late second and early third generation)

Procedural abstraction; parameter passing mechanisms; nesting; scope and visibility declaration

OO Topology

Object Oriented

(OOP) OO Programming

  • method of implementation in which programs are organized as cooperative collections of objects,
  • each object represents an instance of some class
  • again the classes are all members of a hierarchy of classes united via inheritance relationship

(OOD) OO Design

  • method of design encompassing the process of object oriented decomposition
  • and a notation for depicting model based on object-oriented methodology
  • design method should consists of both logical and physical as well as static and dynamic models of the system under design

Object Oriented

(OOD) OO Design

  • method of design encompassing the process of object oriented decomposition
  • and a notation for depicting model based on object- oriented methodology
  • design method should consists of both logical and physical as well as static and dynamic models of the system under design

(OOP) OO Analysis

  • method of analysis that examines requirements from the perspective of the classes and and objects found in the vocabulary of the problem domain

Programming Paradigms

  • Procedure-oriented Algorithms
  • Object-oriented Classes & objects
  • Logic-oriented Goals, often expressed in a predicate calculus
  • Rule-oriented If-then rules
  • Constraint-oriented Invariant relationships

Strength ๏ƒž RO โ€“ knowledge base; PO โ€“ computation-intense operations; OO โ€“ broadest set of application, serves architectural framework in which other paradigm can be employed

โ€œ a way of organizing program on the basis of some conceptual model of programming & an appropriate language to make programs written in the style clear โ€ โ€“ Bobrow & Stefik