0% found this document useful (0 votes)
5 views11 pages

Programming Paradigms Explained in Java

by deepak sir

Uploaded by

paramsharmaup
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views11 pages

Programming Paradigms Explained in Java

by deepak sir

Uploaded by

paramsharmaup
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Smart Programming : Channel

An investment in Knowledge pays the best interest….

Programming Paradigm in Java


Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

=> Programming Paradigm :-


-> Programming paradigm is a way or an
approch to solve any problem or to achieve any task
using any programming languages
-> Programming paradigm are a way to classify
programming languages based on their features
-> There are 2 classifications of programming
paradigm :-
1. Imperative Programming Paradigm
2. Declarative Programming Paradigm

1
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

=> What is difference between Imperative &


Declarative Programming Paradigm ?
1. PROGRAMMING STYLE :-
Imperative :- We have to specify step by
step every task
Declarative :- We have to define the problem
to achieve the task

2. TASK :-
Imperative :- User makes the decision and
command to the compiler
Declarative :- Allows compiler to make
decisions

3. REAL WORLD EXAMPLE :-


-> Task (read mails; buy PC; proposal; .... )
Imperative :-
Declarative :-
2
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

4. SMART :-
Imperative :- User is more smart as
compared to system
Declarative :- System is more smart as
compared to user

5. PROGRAMMING FOCUS :-
Imperative :- "What"
Declarative :- "How"

6. PRIMARY FLOW CONTROL :-


Imperative :- Loops, Conditional;
functions/methods etc
Declarative :- Functions calls (including
recursion)

3
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

7. EXAMPLE :-
Imperative :- FORTRAN, Assembly
Languages, COBOL, C, C++, Java, Python etc
Declarative :- SQL, Haskell, Prolog etc

=> Diagram for Programming Paradigm :-

4
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

=> Unstructured Programming Paradigm :-


1. These are the first programming language
categories that was introduced at starting point of
computers
2. For examples FORTRAN, COBOL, BASIC etc
3. In these languages there was not fixed
structure or way to achieve the task or to solve the
problem
4. In this type we use mnemonic codes
5. In this part flow control was achieved by
"goto" statement
6. Hard to learn and difficult to achieve any task
because number of lines of code were increased

5
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

=> Structured Programming Paradigm :-


1. These were introduced after unstructured
programming paradigm and used till now
2. For examples PASCAL, C etc
3. These have fixed structure to achieve any
task
4. These dont use any mnemonic codes which
makes this language easier (high level language
syntax is used)
5. In this part a lot of flow control statements
were introduced for example if, else, for, while etc
6. Easier to learn and easy to achieve any task
as there were improved code

-> Structured programming paradigm have a lot


of issues like less modularity, abstraction was not
good, less security, less sharability, less code
reusability and because of these reasons OOP's
was introduced
6
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

=> Procedure Programming Paradigm :-


1. In POP task can be divided into small parts
known as functions/methods
2. In POP top to down approch is used
3. No Access Specifiers
4. It deals with algorithms
5. It uses less memory
6. For example FORTRAN, PASCAL, C etc

-> In POP there were a lot of issues less security


and due to this reason OOP's were mostly adopted
language by developers

7
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

=> Object Oriented Programming Paradigm :-


1. In OOP program is divided into parts i.e.
Objects
2. In OOP bottom up approch is used
3. Have a lot of access modifiers or access
specifiers
4. OOP deals with data
5. It needs more memory as compared to POP
6. For examples Java, C++, C#, Python etc

NOTE : One language can use multiple


programming paradigm

8
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

=> What is difference between Object Oriented


Programming Languages and Object Based
Programming Languages ?
-> In object oriented programming languages
inheritance feature is mostly used but in case of
object based programming languages inheritance
concept is not used.
-> Object oriented programming languages are
Java
Object based programming languages are
JavaScript

9
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308

Company Links & Contacts

Company Name: Smart Programming (+91 62838-30308)

Address : Chandigarh & Mohali (Punjab), India

Websites: [Link]
[Link]

Android App:
[Link]
rtprogramming

YouTube Channel:
[Link]

10

You might also like