Posts

Procedural oriented programming

Procedural oriented programming Procedural oriented programming (pop):- A program in a procedural language is a list of instruction where each statement tells the computer to do something. It focuses on procedure (function) & algorithm is needed to perform the derived computation. When program become larger, it is divided into function & each function has clearly defined purpose. Dividing the program into functions & module is one of the cornerstones of structured programming. E.g.:- c, basic, FORTRAN. Characteristics of Procedural oriented programming:- It focuses on process rather than data. It takes a problem as a sequence of things to be done such as reading, calculating and printing. Hence, a number of functions are written to solve a problem. A program is divided into a number of functions and each function has clearly defined purpose. Most of the functions share global data. Data moves openly around the system from function to function. Drawback ...

Object oriented programming

Object oriented programming Object oriented programming : The main idea behind object oriented approach is to combine process (function) and data into a unit called an object. Hence, it focuses on objects rather than procedure. Characteristics of Object Oriented Programming : Objects:- Any physical or logical units having specific characteristics which match to the real word are called as object. Object oriented approach views a problem in terms of objects rather than procedure for doing it. Objects can be classified below:- Physical objects Elements of the computer user environment Collection of data User defined data types Components in computer games Class:- A class is a collection of similar objects. E.g. ram, sita, hari are the member of class student. Inheritance:- Inheritance is the capability of one class to inherit the properties from another class. The child or derived class inherits the characteristics of base or parent class. The child clas...

Modular Programming

Modular Programming Modular programming also called as  stepwise refinement  or  top-down design  is a programming approach that breaks down program functions into modules. Modular programming definition Modular programming is a technique of developing software by separating the functionality of a program into independent, interchangeable modules that are combined together to get the final working software. Programming Languages that support the concept of modular programming are Ada, Algol, COBOL, Component Pascal, D, Erlang, F, Fortran, Haskell, HyperTalk, IBM/360 Assembler, IBM RPG, Java (packages are considered as modules), MATLAB, ML, Pascal, Perl, PL/I, Python, Ruby, SmallTalk etc. Modular programming is a solution to the problem of very large programs that are difficult to debug and maintain. Libraries of components built from separately compiled modules can be combined into a whole by using a programming ...

Generic programming

Generic programming Generic programming means that you are not writing source code that is compiled as-is but that you write "templates" of source codes that the compiler in the process of compilation transforms into source codes. The simplest example for generic programming are  container classes  like arrays, lists or maps that contain a collection of other objects. But there's much more to generic programming. In the context of C++ (and called  meta programming ) it means to write programs that are evaluated at compile time . A basic example of generic programming are templates of containers: In a statically typed language like C++ you would have to declare separate containers that hold integers, floats, and other types or deal with pointers to  void  and therefore losing all type information. Templates which are the C++ way of generic programming leverage this constraint by letting you define classes where one or more parameters are unspecified at...

Introduction to C++

Image
Introduction to C++ C++, as we all know is an extension to C language and was developed by  Bjarne stroustrup  at bell labs. C++ is an intermediate level language, as it comprises a confirmation of both high level and low level language features. C++ is a statically typed, free form, multiparadigm, compiled general-purpose language. C++ is an  Object Oriented Programming language  but is not purely Object Oriented. Its features like  Friend  and  Virtual , violate some of the very important OOPS features, rendering this language unworthy of being called completely Object Oriented. Its a middle level language. Benefits of C++ over C Language The major difference being OOPS concept, C++ is an object oriented language whereas C language is a procedural language. Apart form this there are many other features of C++ which gives this language an upper hand on C laguage. Following features of C++ makes it a stronger language than C, There is St...