Lecture 01 Introduction to Programming Techniques
What are the Program Organizing Techniques ? There are four different techniques, they are
Unstructured Programming Working: Main program directly operates on global data. Impractical when the program gets large. The same statement sequence must be copied if it is needed at different places. …. EG: for (I=1;I<=10;I++) ….. cout << ‘*’; DIS : Program becomes large …..
Structured Programming (Procedural Programming) main program procedure Main ( ) { add( ); subtract ( ); } Add ( ) Combine a sequence of statements into a procedure with calls and returns. { ……} Subtract( ) { …..}
Structured Programming (cont.) Main program coordinates calls to procedures and hands over appropriate data as parameters.
Modular Programming Procedures of a common functionality are grouped together into separate modules. Main program coordinates calls to procedures in separate modules and hands over appropriate data as parameters.
Problems with Structured and Modular Programming Unrestricted access to global data. Poor modeling of the real world. (Attributes and behavior are separated - data and methods are separated) Can’t create new data type easily.
Object-Oriented Programming • Combine data and functions into object. (Member Data & Member Functions) • Member functions are also called methods. • Member data are hidden within member functions. • Data Encapsulation & Data Hiding. • Objects interact by sending messages to each other.
Object-Oriented Programming (cont.) • Object-Oriented Model

Lecture01

  • 1.
    Lecture 01 Introduction to Programming Techniques
  • 2.
    What are theProgram Organizing Techniques ? There are four different techniques, they are
  • 3.
    Unstructured Programming Working: Main programdirectly operates on global data. Impractical when the program gets large. The same statement sequence must be copied if it is needed at different places. …. EG: for (I=1;I<=10;I++) ….. cout << ‘*’; DIS : Program becomes large …..
  • 4.
    Structured Programming (Procedural Programming) main program procedure Main ( ) { add( ); subtract ( ); } Add ( ) Combine a sequence of statements into a procedure with calls and returns. { ……} Subtract( ) { …..}
  • 5.
    Structured Programming (cont.) Main program coordinates calls to procedures and hands over appropriate data as parameters.
  • 6.
    Modular Programming Procedures ofa common functionality are grouped together into separate modules. Main program coordinates calls to procedures in separate modules and hands over appropriate data as parameters.
  • 7.
    Problems with Structuredand Modular Programming Unrestricted access to global data. Poor modeling of the real world. (Attributes and behavior are separated - data and methods are separated) Can’t create new data type easily.
  • 8.
    Object-Oriented Programming • Combinedata and functions into object. (Member Data & Member Functions) • Member functions are also called methods. • Member data are hidden within member functions. • Data Encapsulation & Data Hiding. • Objects interact by sending messages to each other.
  • 9.
    Object-Oriented Programming (cont.) • Object-Oriented Model