procedure programming

A LOOK AT PROCEDURE ORIENTED PROGRAMMING

Conventional programming, using high level languages such as COBOL,FORTRAN ,and c language, is commonly known as procedure-oriented programming(POP). in the procedure oriented programming approach, the problem is viewed as a sequence of things to be done such as calculating, printing and reading. The number of functions are written to accomplish these all tasks. and The primary focus in on the functions, A typically program structure for procedural programming approach is show below in the figure. The technique of hierarchical decomposition has been used to specify the tasks to be completed for solving a program as show in figure

Diagram

procedure oriented programming structure picture

Procedure oriented programming approach basically consists of writing a list of instructions for the computer to follow, and organizing these instructions into a groups known as functions. We generally use a flowchart to organize these actions and represent the flow of control one action to another. whenever we concentrate on the development of functions, very little attention is given to data that are being used by various functions. what happens to the data?

In a multiple function programs, many important data items are places as global so they may be access by all functions, and each (every) function may have its own local data. in the below figure show the relationship of data and functions in a procedure oriented program

data and functions relationship picture

OBJECT-ORIENTED PROGRAMMING PARADIGM

The major motivation factor in the invention of object oriented approach is to remove some of flaws encountered in the procedural programming approach . Object oriented programming treats data as a critical element in the program development and does’nt allow it to flow freely around the system. It tries data more closely to functions that operate on it, and protects it from accidental modification from outside function. Object oriented programming system allows decomposition of a problem into a number of entities called objects and then builds data and functions. around these objects. The data of an object can be accesses only by the functions associated with that object. However, show in the below when functions of one object can access the functions of other objects

organization data and function in oops picture

Some of the features of object oriented programming are below:

1. Emphasis is on data rather than procedure.
2. Program are divided into what are known as objects.
3. Data structure are designed such that they characterized the objects.
4. functions that are operate on the data of an object are tied together in the Ds (data structure).
5. Data is hidden and cannot be accessed by external functions only access by internal functions.
6. objects can communicate with each other through functions
7. new functions and data can be easily added whenever need
8. follows bottom to up approach in program design

Object oriented programming(OOPS) is the most recent concept amount programming paradigms and still means different things to different people. it is therefore important to have a working definition of object oriented before we proceed further. we define (OOPS) “object oriented programming” as an approach that provides a way of modularity programs by creating partitioned memory area for both functions and data that can be used a template for creating copies of such modular on demand. thus an object is considered to be a partitioned area of computer memory that stores data set of operations that can access that data.

  • C++ Dynamic Initialization of Objects
  • C++ Copy Constructor
  • C++ Dynamic Constructor
  • C++ Destructors
  • C++ Exercise
  • C++ Operator Overloading
  • C++ Overloading Unary Operators
  • Const pointer in C
  • Void pointer in c
  • C++ Overloading Binary Operators
  • C++ Overloading Binary Operators Using Friends
  • C++ Manipulation String Using Operators
  • C++ Rules for overloading operators
  • C++ Exercise
  • C++ Basic To class Type
  • C++ Class TO Basic Type
  • C++ One class To another class type
  • C++ Exercise
  • C++ Inheritance introduction
  • C++ Single Inheritance
  • C++ Multiple Inheritance
  • C++ Ambiguity Resolution in inheritance
  • C++ Hierarchical Inheritance
  • C++ Hybrid Inheritance
  • C++ Virtual Base Classes
  • C++ Exercise
  • C++ abstract class
  • C++ nesting of classes
  • C++ Exercise
  • C++ polymorphism
  • C++ Exercise
  • C++ pointers
  • C++ Pointers TO object
  • C++ this pointer
  • C++ Pointer to Derived class
  • C++ Virtual functions
  • C++ Exercise
  • C++ streams
  • C++ unformatted I/O operations
  • C++ Put() and get()
  • C++ getline() and write()
  • C++ Formatted console I/O
  • C++ Manipulators
  • C++ Exercise
  • C++ file handling
  • C++ file stream classes
  • C++ Open and closing file
  • C++ open using constructor
  • C++ open using open()
  • C++ Detecting End of file
  • C++ File modes
  • C++ File pointers and Manipulators
  • C++ Sequential I/O
  • C++ Reading and Writing
  • C++ Updating a File
  • C++ Error handling In File
  • C++ Command Line Arguments
  • C++ Exercise
  • C++ Template introduction
  • C++ Class Templates with multiple Parameters
  • C++ Function templates
  • C++ Function templates with multiple parameters
  • C++ member function Template
  • C++ Exercise
  • C++ Exception handling
  • C++ Basics of Exception Handling
  • C++ Exception Handling Mechanism
  • C++ Throwing Mechanism
  • C++ Catch Mechanism
  • C++ Catch all Exceptions
  • C++ Re-Throwing An Exception
  • C++ Specifying Exceptions
  • C++ Exercise