Professional Documents
Culture Documents
Topics
Programming Languages
Structured Programming vs Object Oriented Programming
Structured Programming
Object Oriented Programming
Basics Concepts of Object Oriented Programming
Benefits of OOP
Applications of OOP
Programming Languages
What is a Program?
Programming Languages
A program is like a recipe. It contains a list of ingredients (called variables) and a list
of directions (called statements) that tell the computer what to do with the variables.
The variables can represent numeric data, text, or graphical images.
Recipe
Programming Languages
Let’s take an example of C program:
There are two ingredients from the above program a and b are called as
variables.
Programming Languages
Let’s take an example of C program:
There are four directions which are called as statements and tell the
computer to do these activities. They are:
1. Print the message “Enter first integer number ::”
2. Read integer value from user and store in variable a.
3. Print the message “Enter second integer number ::”
4. Read integer value from the user and store in variable b.
5. Add a + b and print message according the printf statement.
Programming Languages
One characteristic that is constant in the software industry today is the “change”.
Change is one of the most critical aspects of the software development and management.
New tools and new approaches are announced almost every day.
The Impact of these developments raises a number of issues that must be addressed by the
software engineers or software developers.
Most important among them are maintainability, reusability, portability, security, and user
friendliness of software products.
Structured Programming vs Object Oriented Programming
Yes
Structured Programming vs Object Oriented Programming
Structured Programming:
Structured programming is a programming paradigm aimed on improving the clarity, quality,
and development time of a computer program by making extensive use of subroutines, block
structures and for and while loops. Using of goto structure is discouraged because to the read
and maintain the code by the user will be difficult.
C is structured programming became very popular and was the paradigm of the 1980’s.
That enabled programmers to write moderately complex programs fairly easily.
Code is given more importance
As the programs grew larger, even structure approach failed in terms if bug-free, easy-to-
maintain and reusability of programs.
Structured Programming vs Object Oriented Programming
The figure illustrates that a single function name can be used to handle
different number and different types of augments.
Structured Programming vs Object Oriented Programming
Message Communication
As object oriented program consists of a set of objects that communicate with each other involves
the following basic steps.
1. Creating classes that define objects and their behavior.
2. Creating objects from class definition.
3. Establishing communication among objects.
Objects communicate with one another by sending and receiving information much same way as
people pass messages to one another.
Benefits of OOP
OOP offers several benefits to both the program designer and the user. Some of the benefits are listed.
Through inheritance, the programmer can eliminate redundant code and extend the use of existing
classes.
The principle of data hiding helps the programmer to build secure programs that cannot be invaded
by code in other parts of the program
It is easy to divide the work in a project based on objects.
It is possible to have multiple objects to coexist without any interference.
Message passing techniques for communication between objects make the interface description
with external systems much simpler.
Software complexity can be easily managed.
Applications of OOP
Object oriented technology is certainly changing the way software engineers think, analyze, design and
implement systems today.
?