[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
AsmOOP-WhatIs
Usually, people start learning programming by writing small and simple programs consisting only of one main program. Here ``main program'' stands for a sequence of commands or statements which modify data which is global throughout the whole program. As you should all know, this programming techniques provide tremendous disadvantages once the program gets sufficiently large. For example, if the same statement sequence is needed at different locations within the program, the sequence must be copied. This has lead to the idea to extract these sequences, name them and offering a technique to call and return from these procedures.
Procedural Programming
With procedural programming you are able to combine returning sequences of statements into one single place. A procedure call is used to invoke the procedure. After the sequence is processed, flow of control proceeds right after the position where the call was made.
Modular Programming
With modular programming procedures of a common functionality are grouped together into separate modules. A program therefore no longer consists of only one single part. It is now devided into several smaller parts which interact through procedure calls and which form the whole program. Each module can have its own data. This allows each module to manage an internal state which is modified by calls to procedures of this module. However, there is only one state per module and each module exists at most once in the whole program.
Object Oriented programming
Object-oriented programming solves many problems. In contrast to the other techniques, we now have a web of interacting objects, each house-keeping its own state. Each object is responsible to initialize and destroy itself correctly. Consequently, there is no longer the need to explicitly call a creation or termination procedure.
Extracted from "Introduction to Object-Oriented Programming Using C++" by Peter Müller (pmueller@uu-gna.mit.edu), Globewide Network Academy (GNA), www.gnacademy.org/, August 31, 1997
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
AsmOOP-WhatIs
What is Object-Oriented programming ?
Unstructured (linear) ProgrammingUsually, people start learning programming by writing small and simple programs consisting only of one main program. Here ``main program'' stands for a sequence of commands or statements which modify data which is global throughout the whole program. As you should all know, this programming techniques provide tremendous disadvantages once the program gets sufficiently large. For example, if the same statement sequence is needed at different locations within the program, the sequence must be copied. This has lead to the idea to extract these sequences, name them and offering a technique to call and return from these procedures.
Procedural Programming
With procedural programming you are able to combine returning sequences of statements into one single place. A procedure call is used to invoke the procedure. After the sequence is processed, flow of control proceeds right after the position where the call was made.
Modular Programming
With modular programming procedures of a common functionality are grouped together into separate modules. A program therefore no longer consists of only one single part. It is now devided into several smaller parts which interact through procedure calls and which form the whole program. Each module can have its own data. This allows each module to manage an internal state which is modified by calls to procedures of this module. However, there is only one state per module and each module exists at most once in the whole program.
Object Oriented programming
Object-oriented programming solves many problems. In contrast to the other techniques, we now have a web of interacting objects, each house-keeping its own state. Each object is responsible to initialize and destroy itself correctly. Consequently, there is no longer the need to explicitly call a creation or termination procedure.
Extracted from "Introduction to Object-Oriented Programming Using C++" by Peter Müller (pmueller@uu-gna.mit.edu), Globewide Network Academy (GNA), www.gnacademy.org/, August 31, 1997
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
