Oop Lecture 01
Oop Lecture 01
Programming Languages
and Evolution of OOP
• Assembly language is the more than low level and less than
high-level language so it is intermediary language.
• Easier to understand
• Machine independent
• Example: C, C++, Java, C#
Problems with Structured Programming
No matter how well the structured programming approach is
implemented, large programs become excessively complex.
Two major problems:
- Unrestricted access
- unrelated functions and data
Problems with Structured Programming
Unrestricted Access:
In a procedural program, one written in C for example, there are
two kinds of data.
Local data: is hidden inside a function, and is used
exclusively by the function
Global data: can be accessed by any function in the program
Problems with Structured Programming
Unrestricted access
Unrestricted access:
In a large program, there are many functions and many
global data items.
The problem with the procedural / structural paradigm is
that this leads to an even larger number of potential
connections between functions and data
Problems with Structured Programming
Unrestricted Access:
This large number of connections causes problems in several
ways. First, it makes a program’s structure difficult to
conceptualize.
Second, it makes the program difficult to modify.
A change made in a global data item may necessitate rewriting all
the functions that access that item.
Problems with Structured Programming
▪ object/class
▪ information hiding (encapsulation)
▪ inheritance
▪ Polymorphism
▪ Abstraction
Object
30
Encapsulation