Save
Introduction to object oriented programming concepts
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Amaira Goyal
Visit profile
Cards (40)
Computer
An electronic device that accepts instructions in a specific
language
It is very difficult to establish
communication
between the user and the computer if he/she is not aware of computer
language
Types of computer languages
High
Level Language
Low
Level Language
Low Level Languages
Computer recognizes the
instructions
, without
conversion
into any other form
Types of Low Level Languages
Machine Language
Assembly Language
Machine Language
Instructions are coded in terms of
binary digits
(bits), i.e. in the form of
zeroes
and
ones
(0's and
1's)
Assembly Language
Instructions are coded in terms of mnemonics (or
operation
codes)
Assembly Language
Easier to write
instructions
compared to machine
language
Error
detection
and correction is comparatively easier
Code can easily be
modified
Assembly
language is also a
machine dependent
language
Users need to remember all the
mnemonics
in
assembly
language
A
translator
is required to convert
assembly language instructions
into machine code
High Level Languages
(HLLs)
Instructions can be written using
logical
words or
phrases
, easier to understand and develop program logic
High Level Languages
Machine
independent
Error
detection
and
correction
is easier
High level language requires a
translator
to convert the
source code
(program) into machine code</b>
Machine code of high level instructions might be less
efficient
than the machine code generated from
assembly language
instructions
Compiler
Software that accepts the whole program written in high level
language
and converts it into its equivalent program in machine
language
Interpreter
Software that accepts the program line by
line
, converts it into machine
language
, and executes it immediately
Compiler is comparatively
faster
than the interpreter but sometimes more difficult to use as it displays all the
errors
together
Types of High Level Languages
Procedure Oriented Programming Languages
Object Oriented Programming Languages
Procedure Oriented Programming
(
POP
)
Instructions
for the computer to follow are organized into
groups
known as functions
Procedure Oriented Programming
(
POP
)
Emphasis on
logical
steps
Data
flows from one function to another
Limitations of Procedure Oriented Programming (
POP
) include complex programs,
global
data access
Object Oriented Programming (OOP)
Approach to designing programs by creating
self-contained
units called objects, each containing both
data
and related functions
Object Oriented Programming (
OOP
)
Data
is protected and separate from
external
functions
Allows for code
reuse
and
modularity
Procedure Oriented Programming
(
POP
)
Rather than the
data
, the focus is on the
procedures
Procedure Oriented Programming (POP)
Monolithic
structure
Top-down
approach
Object Oriented Programming (
OOP
)
Approach to
designing
software by creating partitions called
objects
Object Oriented Programming (OOP)
Data
and
functions
are organised together in objects
Data
can only be
accessed
through the associated functions
Allows
data hiding
Object Oriented Programming (
OOP
) is a powerful tool in programming due to the feature of
data hiding
Some of the key benefits of Object Oriented Programming (OOP) include
code reusability
, modularity, and
data abstraction
Differences between Procedural Oriented Programming (POP) and Object Oriented Programming (OOP)
Focus on
procedures
vs focus on
data
Monolithic
structure vs
modular
structure
Top-down approach vs
bottom-up
approach
Object
Unique entity
containing
data
and functions (characteristics and behaviour)
Real World
Object
Objects we experience or use in day-to-day life, containing
characteristics
and
behaviour
Basic Principles of Object Oriented Programming (OOP)
Encapsulation
Inheritance
Polymorphism
Data Abstraction
Data
Abstraction
Presenting the essential features
without
revealing the
background
details
Inheritance
Acquiring properties of one
class
by another
class
Polymorphism
Ability of an operation to exhibit
different
behaviours for
different
sets of data and environment
Encapsulation
Restricting the free flow of data from one object to another by wrapping data and
functions
together
Benefits of Object Oriented Programming (OOP) include improved code reusability,
modularity
, and
data abstraction
Limitations of Object Oriented Programming (
OOP
) include more
time-consuming
problem solving and the need for a thorough understanding of the concepts