Monday, December 9, 2013

Object Oriented Programming Technique (with C++)



This article is for those who are already familier with the programing system in c language. If you do not use c language then it will be hardly to understand the Object Oriented programing (simply OOP).
Before going to the main theme let us discuss what is object oriented language?

Object oriented programming language is the modification of c language features. It gives us the opportunity to solve and code any large and difficult problem within the simplest way. We can also divide the problem into
pieces (as like as the user defined function we use in C programing).
The main features of the object oriented programing are:

  1. Encapsulation 
  2.  Data hiding  
  3. Polymorphism 
  4. Function and Operator Overloading.
  5. And the most significant attribute is “Inheritence”.

So when we can see any programing language gives us these 5 facilities we can say it OOP or object oriented programing language. Some object oriented programing languages are:

  1. C++ 
  2. java.
  3. C#(C sharp)

Note: PHP- preprocessor hypertext language also use the OOP features during long and huge coding.
An Example of C++ code: (So that you can find the ddifference between C and C++)



#include <iostream>

#include <conio.h>


using namespace std;

class bsns
{

    public:
    int n,i,j,p[100],r,max;
    void input();
    void sort();
    void display();

};

Look care fully you can find two new keyword: "<iostream>" and "Class". We will discuss them briefly in details later.
 

No comments:

Post a Comment