Object Oriented Programming - Lecture 1
Object Oriented Programming - Lecture 1
Object Oriented Programming - Lecture 1
Lecture 1
• Machine language
• Unstructured programming languages
• Procedural programming languages
• Structured oriented programming languages
• Object oriented programming languages
Procedural
Structured Object
Unstructured programming
programming oriented
Machine programming languages
languages programming
Language languages e.g.
e.g. C and languages
e.g. assembly FORTRAN,
PASCAL e.g. C++ JAVA
COBOL
Overview of programming language types and levels
Machine language
In machine language data only represented with the help of In assembly language data can be represented with the
binary format(0s and 1s), hexadecimal and octadecimal. help of mnemonics such as Mov, Add, Sub, End etc.
Machine language is very difficult to understand by the hu- Assembly language is easy to understand by the human be-
man beings. ing as compare to machine language.
Modifications and error fixing cannot be done in machine Modifications and error fixing can be done in assembly lan-
language. guage.
Machine language is very difficult to memorize so it is not Easy to memorize the assembly language because some
possible to learn the machine language. alphabets and mnemonics are used.
Execution is fast in machine language because all data is
Execution is slow as compared to machine language.
already present in binary format.
There is no need of translator.The machine understandable Assembler is used as translator to convert mnemonics into
form is the machine language. machine understandable form.
Assembly language is the machine dependent and it is not
Machine language is hardware dependent.
portable.
Unstructured programming languages
Entire logic of the program is written as a single continuous (nonstop
or unbroken) block is called "unstructured Programming".
The importance is given to the operation rather than the data, which
might pose issues in some data-sensitive cases.
Limitations
Data hiding
Debugging of program is hard
Not possible to handle run time errors and future
enhancements
Software development period and cost is high
If end user require changes, a big modification is
needed in software
More stress laid on procedures not on data
Object oriented programming languages
Prime focus is on the data that is being operated and not on the
functions or procedures.
Procedure/Structure oriented
Object oriented
Bottom-up.
Top-down.
Main focus is on 'data security'. Hence, only ob-
Main focus is on "how to get the task done" i.e. on jects are permitted to access the entities of a
the procedure or structure of a program . class.
There is no proper way of hiding the data, so data Data is hidden in three modes public, private, and pro-
is insecure tected. hence data security increases.
Data is shared among the objects through the member
Global data is shared among the functions in the
functions.
program.
Classes or function can become a friend of another
class with the keyword "friend".
No concept of friend function.
Note: "friend" keyword is used only in c++
Attributes
(instance variable / information / property / characteristic / field
and state) are the attributes of the object, - Characteristics of
certain object.
Example
Why OOP?
OOP is an approach that provides a way of
modularizing programs by creating partitioned memory
area for both data and functions that can be used as
templates for creating copies of such modules on
demand.
34
References
• https://www.geeksforgeeks.org/classes-objects-java/
• https://
techdifferences.com/difference-between-oop-and-pop.html
• https://www.educative.io/blog/object-oriented-programming
• https://www.geeksforgeeks.org/difference-between-machine
-language-and-assembly-language
/
• https://www.learncomputerscienceonline.com/computer-pro
gramming/#
POST2anchor2
• https://www.geeksforgeeks.org/introduction-of-programming
-paradigms
36
THANK YOU
37
Next
Introduction to Java, NetBeans IDE, basic
program, syntax, first program with use of
class, object, attribute and method