0% found this document useful (0 votes)
11 views

Intro Unit 6_programming Paradigms

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Intro Unit 6_programming Paradigms

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Programming and Problem Solving

UNIT: VI Object Oriented Programming

Programming Paradigms
Programming Paradigms
▪ Fundamental Style of Programming
▪ Defines structure and Basic Elements of Programming Language
▪ Style and Features of Language depends upon Programming Paradigm it
supports.
Programming Paradigms are classified as
• Monolithic Programming
• Procedural Programming
• Structural Programming
• Object Oriented Programming
Monolithic Programming
▪ This programming consist of Global and Sequential Data
▪ Global Data can be accessed and modified ASSEMBLY
LANGAUGE AND
BASIC
▪ All instructions are executed in sequence PROGRAMMING

▪ To change the sequence , we can use JUMP Instructions


MOV AX , A
Advantages : Simple Programming ADD AX, B
MOV SUM, AX
Disadvantages: JUMP STOP
Do not support Subroutines
Larger Programs …………….
STOP : .EXIT
Difficult to Debug and Maintain
Procedural Programming
▪ Program divided into Subroutines which performs specific task.
▪ Repetition is avoided due to subroutines
FORTRAN
▪ Subroutine can call another subroutine if required AND
COBOL
▪ To alter execution sequence we can use JUMP, GOTO, CALL
Advantages :
Global Data
Writing Correct Programs , Easier to write Programs
Disadvantages:
Complex Programs No reusability
Programs
Requires more time to write Program Difficult to maintain
Global Data gets shared so may altered
Structural Programming
▪ Also called modular programming
▪ Enforce Logical Structure on Program
▪ Used in Large Programs
▪ Uses Top Down Approach
▪ Modules are coded and tested separately
▪ Divide Large programs into smaller modules
Advantages :
Programs are easy to understand Enhance Programmers Productivity
Need less time to write program Module performs specific task and has local data
Easy to Debug More focus on Code and less focus on Data
Structural Programming
Disadvantages :
No Data Centric Programming
C
Global Data is shared PROGRAMMING

Main Focus is on Functions

Global Data

Programs have their own


local data
Object Oriented Programming
Data is critical Element in OOP
Restrict access of data everywhere in Program
C++
Task Based and Data Based JAVA
Python
Advantages of OOP:
Data Centered Programming
Program divided in terms of Objects not in Procedures
Function work on data are tied to that data
Private Data
Data is hidden and not accessible to external functions
New Data can be easily added Functions
Follows Bottom Up approach

You might also like