6.Object Oriented Concepts


                    
Ø Software developed using object oriented methodology are proclaimed to be more reliable, easier to maintain, reuse and enhance.
Ø Object oriented concepts started creation of new software originating in the 1960s. since mid 1980s,  It had become the main main programming paradigm used in the creation of new software.
Ø Popular programming language that support oop are C++, Java, C#, VB.net, ASP.net and PHP.
Ø The way of programming language divided to two categories:
    1.structure/procedural         2. Object oriented.
Ø Procedural programming language focus is on writing function and procedures which operate on data.
Ø Object oriented programming focus is on object which contain both data and  functionality.
Ø Power of object oriented programming language enables the programmer modular, reusable and extendable code.
Ø Oop uses object as its fundamental building block    similar object classified using concept of class.Object are the entities of which the world comprised( e.g. Car, person, time, date etc.).
Ø Object oriented support four specific characteristics: 1.abstraction, 2.encapsulation, 3.polymorphism, 4.inheritance
Ø Characteristics are Known as Properties or Attributes.
Ø Object identify by use of value. Values are called State (In OOP).
Ø Behavior associated with Object .Behavior is is known as method or features.
Ø Object Oriented system uses the concept of class.
·        Enables to express the set of objects.
·        considered blue print for various objects.
·        template for multiple objects with similar features.
Ø Unified Modeling Language(UML): Used to create models of object oriented software to help with design of an application.
Ø UML is visual modeling Language.UML defined and maintained by Object Management Group(OMG).
Ø Class Diagram is to model the static view of an Application.Represent using icon rectangle split into three section: 1. Class ame, 2.Attributes or properties, 3.Behavior or methods or operations.
(Note- [ ] square bracket Optional Add Item enclosed between < > angle bracket)
Ø UML notation an attribute is declared using syntax:
[<visibility>]<attrityute name>[:<attribute data type> [=<initial value>]]
Ø  Visibility can be 1.Private ( - ),     2. Protected ( # ),      3.Public (+ ),   4. Packege ( ~ ).
Ø Attribute generally refers to Variable (E.g. name, date(it means data field))



Ø UML notation an operation is declared using syntax:        
[<visibility>]<method name>( parameter list separated by comma ):<return type>
Ø Computer Program two core elements: Data and functions
·        Structured/Procedural Programming Language two core elements as two separate entities.
·        Object Programming Language two core elements as a single entity.
Ø Encapsulation: The mechanism providing protection of data and methods of a program is called encapsulation.
·        Data hiding Capabilities, wrapping data method into single unit, data safe from unintended action and inadvertent access by outside objects.
Ø Data Abstraction: Hide complexity, relies on the separation of interface and implementation, Provide skeleton and templates for our use.(Ex. Television Set)
·        ADT(Abstract Data Types) or structures (struct) in C/C++, Classes in C++/Java are examples of  Data abstraction.
Ø Messaging: In Object Oriented terminology a call a method to referred to as a message
Ø Polymorphism means “many form”. There may be different form of single method or operation.
·        Polymorphism is achieved using two types of overloading 1.Method Overloading , 2.Operator Overloading.
Ø Aggregation and Composition: When object of one class composed of objects of other class, it is called aggregation or composition.
·        It represent  ‘has-a’ or ‘a-part of’ relationship between classes.
·        Aggregation: (Empty Diamond symbol) Non-exclusive relationship between two class.
·        Composition: (Filled Diamond symbol) exclusive relationship between two class.
·        The class that contains objects of other class is known as Owner class, whole class or aggregating class.
·        The class is contained in owner class is known as subject class, part class and aggregated class.
Ø Inheritance refers to the capability of defining a new class of objects that inherits the characteristics of  another existing class.
·        Generalization is another name of inheritance or ‘is-a kind of’ relationship between two class.
·        In Object Oriented terminology new class is called Sub class, Child class and Derived class.
·        In Object Oriented terminology existing class is called Super class, Parent class and Base class.
·        When a class derived from two or more class. It  is known as multiple inheritance.

No comments:

Post a Comment