Sunday, 27 May 2018

Google

1 comment

All google

Read More

Sunday, 9 July 2017

Features of Object Oriented Programming

1 comment

1.2 Features of Object Oriented Programming
  • Emphasis is given on data rather than procedures.
  • Problems are divided into objects.
  • Data structures are designed such that they organize the object.
  • Data and function are tied together.
  • Data hiding is possible.
  • New data and functions can be easily loaded.
  • Object can communicate with each other using functions.
  • Bottom-up programming approach is used.


--------------------------------------------------------------------------------------------------------------------------
1.3 Procedure Oriented Programming (POP)
  • The given problem is divided into a number of sub problems depending upon its functionality.
  • The sub problems are called procedures or Methods.
  • Any procedure can be called at any point during the program execution.
  • The program has global and local variables.
  • Global variables can be only be used.


--------------------------------------------------------------------------------------------------------------------------
1.4.3 Data Abstraction
     The technique of creating new data types that is well suited to an application to be programmed. It provides the ability to create user- defined data types, for modeling a real world object. having the properties of built-in data types and a set of permitted operators.
Example :




--------------------------------------------------------------------------------------------------------------------------
1.4.4 Encapsulation
     A mechanism that associates the code and the data it manipulates into a single unit and keeps them safe from external interference and misuse.
Example :


--------------------------------------------------------------------------------------------------------------------------
1.4.5 Inheritance

     It allows the extension and reuse of existing code without having to rewrite the code from scratch. Inheritance involves the creation of new classes (derived classes) from the existing ones (base classes), thus enabling the creation of a hierarchy of classes that stimulate the class and subclass concept of the real world. The new derived class inherits the members of the base class and also adds its own.


--------------------------------------------------------------------------------------------------------------------------
1.4.6 Polymorphism

     Polymorphism (from Greek meaning “many forms”) allows a single name/operator to be associated with different operations depending on the type of data passed to it. In C++, it is achieved by function overloading, operator over loading and dynamic binding (virtual functions).

1.4.7 Dynamic binding

     Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run-time.

1.4.8 Message Passing

     The process of invoking an operation on an object. In response to a message, the corresponding method (function) is executed in the object.

1.5 Benefits of 00P
  • It is easy to model a real system as real objects are represented by programming objects in OOP. The objects are processed by their member data and functions. It is easy to analyse the user requirements.
  • With the help of inheritance, we can reuse the existing class to derive a new class such that the redundant code is eliminated and the use of existing class is extended. This saves time and cost of program.
  • In OOP, data can be made private to a class such that only member functions of the class can access the data. This principle of data hiding helps the programmer to build a secure program that cannot be invaded by code in other part of the program.
  • With the help of polymorphism, the same function or same operator can be used for different purposes. This helps to manage software complexity easily.
  • Large problems can be reduced to smaller and more manageable problems. It is easy to partition the work in a project based on objects.
  • It is possible to have multiple instances of an object to co—exist without any interference i.e. each 
  • object has its own separate member data and function. 


1.6 Advantages of GDP

The major advantages of OOPS are:

l. Simplicity

   Software objects model real world objects, so the complexity is reduced and the program structure is very clear.

2. Modularity

    Each object forms a separate entity whose internal workings are decoupled from other parts of the system.

3. Modifiability

     It is easy to make minor changes in the data representation or the procedures in an object oriented program. Changes inside a class do not affect any other part of a program, since the only public interface that the external world has to a class is through the use of methods.

4. Extensibility

     Adding new features or responding to changing operating environments can be solved by introducing a few new objects and modifying some existing ones.

5. Maintainability

     Objects can be maintained separately, making locating and fixing problems easier.

6. Re-usability

     Objects can be reused in different programs.

1.7 Applications of GOP / Usage of GDP
  • Used in Computer Animation
  • Used to access Relational Databases.
  • Artificial intelligence and Expert Systems.
  • CAD/CAM/CIM Systems.
  • Used in logical networking designing.
  • Used to Develop Expert System Software 0 Develop Computer Games
  • Real time Systems.
  • Simulation and Modeling.
  • Neural Networks and Parallel Programming.


SUMMARY
  • Object oriented programming is an approach that provides a way of  modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand .
  • The Program is divided into number of small units called Object.
  • Classes are data types based on which objects are created.
  • A mechanism that associates the code and the data it manipulates into a single unit and keeps them safe from external interference and misuse.
  • Polymorphism (from Greek meaning “many forms ”) allows a single name/operator to be associated with different operations depending on the type of data passed to it.
  • Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run-time.
  • Object-oriented programming languages are languages which supports all OOP concepts.
  • Object - based programming languages are languages which support all OOP concepts except inheritance and dynamic binding. 



CONTENTS


MEGA JAVA PROGRAMMING


Chapter 1

     1. Basic Concepts of 
         Object Oriented Programming

      1.2  Features of Object Oriented Programming 
      1.3  Procedure Oriented Programming
             1.3.1  Features of procedure oriented Programming
             1.3.2  Difference between Procedure Oriented
                       Programming    and   Object    Oriented 
                       Programming (OOP)
      1.4  Basic Concepts of OOPa
             1.4.1  Objects
             1.4.2  Classes
             1.4.3  Data Abstraction
             1.4.4  Encapsulation
             1.4.5  Inheritance
             1.4.6  Polymorphism
             1.4.7  Dynamic binding
             1.4.8  Message Passing
      1.5  Benefits of OOP
      1.6  Advantages of OOP
      1.7  Applications of OOP / Usage of OOP
             Summary




                                                                                                             








                                                                                                                                        






        
Read More

Tuesday, 23 May 2017

Basic Concepts of Object Oriented Programming

Leave a Comment


Chapter 1




Basic Concepts of Object Oriented Programming


1.1 Object Oriented Programming (OOP)


     Object oriented programming is known as OOPs.  Object oriented programming is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand.  (i.e.  OOP allows us to decompose a problem into a number of entities called objects and the builds data and functions around these entities).
Example :
--------------------------------------------------------------------------------------------------------------------------

Read More