OBJECT ORIENTED ANALYSIS AND DESIGN

INTRODUCTION TO OOAD

Object-oriented analysis (OOA) is a process that groups items that interact with one another, typically by class, data or behavior, to create a model that accurately represents the intended purpose of the system as a whole. 


Object-oriented design (OOD) is the process of using an object-oriented methodology to design a computing system or application. This technique enables the implementation of a software solution based on the concepts of objects.

Object oriented concepts

  1. Objects are composite data types. An object provides for the storage of multiple data values in a single unit. Each value is assigned a name which may then be used to reference it. Each element in an object is referred to as a property.

Characteristic of objects

Real-world objects have the following characteristics: state, behavior and identity. i.e

Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail).

Bicycles also have state (current gear, current pedal cadence, current speed) and behavior (changing gear, changing pedal cadence, applying brakes)

State: Every object, at any given point of time would have to have a set of attributes defining its State.

Behavior: Every object based on its state and optionally identity will have particular behavior.

An identity: describes the property of objects that distinguishes them from other objects. A reference can be used to refer to an object with a specific identity. A reference contains the information that is necessary for the identity property to be realized in the programming language

  • Class: A class is a collection of similar objects. It is a template where certain basic characteristics of a set of objects are defined. The class defines the basic attributes and the operations of the objects of that type.
  • Abstraction

A concept important for simplification of representation of complex structures

Representation of complex structure by simpler structure that hide the complex details

In computer science abstraction has enabled the development of various levels of programming languages that enable simplify the definition of the program and data structures that would be difficult to do with the natural language of the computer.

This has simplified the development of the large programs that provide real world solutions programs that would be difficult to implement with the machine language

  • Encapsulation

The containment or packaging of data and functions that use the data in a program module. Encapsulation protects the data from modification by functions external to the object.

This is implemented by definition of abstract structure referred to as class that represents the type of object.

Facilitates information hiding which is an important characteristic that enables create reliable programs

  • Inheritance

Is the process by which objects of one class acquire the properties of objects of another class.

This concept is used in object oriented programming to describe the relationship between types of objects where one object is a sub type of another.

Inheritance is one of the approach to employing reuse in programming.

Reuse by inheritance enables to take an existing type of object, clone it and then make additions and modifications to the clone.

Types of inheritance

  • Single inheritance – A sub type of an object inherits from only one super type.
    • Multiple inheritance – A sub type of an object inherits from two or more super types.
    • Repeated inheritance – A special multiple inheritance where the super types of a subtype inherit from another super type.
    • Selective inheritance – Limited inheritance of a subtype from its super type.

Restricting access to some details in the super type

  • Polymorphism

Polymorphism is a Greek term which means ability to take more than one form. An operation may exhibit different behaviors in different instances. The behavior depends upon the types of data used in operation.

Types of polymorphism

Overloading- This is changing the implementation of a method inherited from a parent class. The name, arguments and the return type remain the same but the action differs

Overriding- This means using the same name for different methods in a class.

  • Message passing

This refers to the communication between objects. Objects communicate with one another by sending and receiving information.

Leave a comment

Design a site like this with WordPress.com
Get started