1 of 16

����Raje Ramrao Mahavidyalaya, Jath.��Department of B.C.A.��Name:-Miss Balikai J.I.�

Object-Oriented Programining

2 of 16

Agenda

  • Object-Oriented Concepts
  • Terminology
  • Object-Oriented Modeling Tips
  • Object-Oriented Data Models and DBMSs
  • OODBMS Manifesto
  • Object Management Architecture
  • Common Object Request Broker Architecture

3 of 16

Object-Oriented Concepts

  • Abstraction – encapsulation and information hiding
    • Identifying the essential aspects of an entity (Object)
    • Abstract Data Type (ADT): interface part (operation) implementation part (data structure)
  • Encapsulation
    • An object has data structure and operations
  • Information hiding
    • Internal details
    • Data independence

4 of 16

Terminology

  • Object Identity
  • Classes
  • Operations, methods & messages
  • Inheritance
  • Polymorphism

5 of 16

Object Identity (OID)

  • System generated
  • Unique to that object
  • Invariant
  • Independent of the values of its attributes
  • Invisible to the user
  • Advantages:
    • Fast, efficient, independent of content, not changeable by user

6 of 16

Class

  • Definition
    • Group of objects with similar properties (attributes), common behavior (methods), similar relationship to other objects, and common semantics.
  • Diagram
    • Box: class name, attributes, operations (methods)
  • Superclasses & subclasses
  • Generalization & specialization

7 of 16

Inheritance

  • Definition
    • A subclass inherits the attributes, operations, and association of its superclasses
  • Types
    • Single inheritance: one superclass
    • Multiple inheritance: two or more superclasses
    • Repeated inheritance: common superclass
    • Selective inheritance: limited number of properties from the superclass

8 of 16

Operations Methods & Messages

  • Operations
    • Function or procedure may be applied to or by objects in a class
  • Methods
    • The implementation of an operation for a class
  • Messages
    • Communication between objects to execution of a method

9 of 16

Link & Association - 1

  • Link
    • A physical or conceptual connection between objects
    • Link attribute describes property of an association
  • Association
    • A description of a group of links with common structure and common semantics
    • Has a name (roles for problem description)
  • A link is an instance of an association

10 of 16

Link & Association - 2

  • Qualified association
    • The objects in a many role are partially or fully disambiguated by an attribute called the qualifier
    • A small box on the end of the association line near the source class
  • Multiplicity
    • The number of instances of one class that may relate to a single instance of an associated class
    • one, many, zero or one

11 of 16

Polymorphism

  • Overloading
    • The name of a method to be reused within a class definition or across class definitions
  • Overriding
    • The name of property to be redefined in a subclass
  • Dynamic binding
    • Runtime determination of object and method

12 of 16

Object Modeling Tips

  • Scope
  • Simplicity
  • Layout of diagram
  • Name (descriptive, crisp, and unambiguous)
  • Association (foreign keys)
  • Multiplicity
  • Qualifiers
  • Review

13 of 16

Object-oriented DBMSs

  • Object-oriented data model (OODM)
    • A logical data model of objects supported in object-oriented programming
  • Object-oriented database (OODB)
    • A persistent and sharable collection of objects defined by an OODM
  • Object-oriented DBMS (OODBMS)
    • The manager of an OODB

14 of 16

OODBMS Manifesto - 1

  • Support complex objects
  • Support object identity
  • Support encapsulation
  • Support types or classes
  • Support inheritance between types or classes
  • Support dynamic binding

15 of 16

OODBMS Manifesto - 2

  • Completed computational DML
  • Extensible data types
  • Data persistence
  • Support very large databases
  • Support concurrent users
  • Backup & recovery
  • Support simple way of querying data

16 of 16

Object Management Architecture (OMA)

  • Object Model (OM)
    • A design-portable abstract model for communicating with OMG (Object Management Group)-compliant object-oriented systems
  • Object Request Broker (ORB)
    • Handles distribution of messages between application objects (software bus)
  • Object Services (concurrency control, security, persistence etc.)
  • Common Facilities (printing, e-mail etc.)
  • Common Object Request Broker Architecture (CORBA)
    • Enable client-server interaction with a specific implementation of ORB