OBJECT ORIENTED PROGRAMMING (OOP)
In todays computer age we need to incorporate sound construction techniques and program structures that can be easily comprehended, implemented and modified.
Before OOP other techniques had been tried they include
1. Modular programming
2. Top-down programming
3. Bottom-up programming
The diagram below shows the progress made in programming languages to reach OOP
1. Machine Language
2. Assembly Language
4. Object-oriented programming
Since the advent of procedure-oriented programming in the 1980s with languages such C as it became the most popular technique. Structured programming enabled programmers to develop moderately complex programs. However as the need to develop very large and complex programs grew, the approach failed to meet this need.
OOP is an approach to program organisation and development that tries to eliminate pitfalls of structured programming.
How Procedure-Oriented Programming works
Examples include (High level) COBOL (Common Business Oriented Language), FORTRAN (Formula Transition Language) and C.
In procedure-oriented programming a problem is viewed as a sequence operations to be done in succession for instance
Functions are used to accomplish tasks
In procedure-oriented programming instructions for the computer to follow are written whereby they are organised into functions, each function achieves a specific goal.
Here it is clear that much emphasis is being put on consideration of functions and data is being overlooked.
1. What happens to the data?
2. How do the functions affect the data?
In a program consisting of many functions it is clear that data items will be placed as global, this means that such data is accessible by all functions.
Note that a function may have local data.
This concept of global data makes it...