Saturday, February 2, 2013

Programming Paradigm



 Programming paradigm:
Programming paradigm means that the fundamental of computer programming. Programming style or methods are changed from language to language.
There are three programming paradigm –

1.     Imperative / Procedural:
Imperative programming languages are the most traditional once. Their code consists of sequential statements to achieve the desired goal.
For Ex:
Basic and Pascal

2.     Functional / Modular:
Functional programming languages are as name suggest, the problems are divided into functions / modules.
For Ex:
C

3.     Object Oriented:
Object oriented programming languages; they mainly focus around objects that have their own properties and procedural / method.
It is also possible to create classes that include the functionality of other already existing classes.

Need of OOPs:
Characteristics of OOPs:
        i.            Emphasis on data rather than procedure.
      ii.            Programs are divided into what are known as objects.
    iii.            Function and data are tied together in a data structure.
   iv.            Data is hidden and cannot be accessed by external functions.
     v.            Objects may communicate with classes through functions.
   vi.            New data and functions can be easily added whenever necessary.
 vii.            Follows bottom up approach in program design.

Some other characteristics included in C++:
a.     Ability to declare variable anywhere.
b.     New data types like long long int, Boolean and complex data type to denote complex numbers.
c.      New header file such as stdbool.h, inttypes.h.
d.     C++ supports exceptional handling for handling errors.
e.     C++ introduced new keywords like new, delete, inline, public, private, this etc.

0 comments:

Post a Comment

Powered by Blogger.