PROGRAMMING PARADIGMS AND MODELS TRB CSI › Programming with C++ › paradigms and models

PROGRAMMING PARADIGMS AND MODELS

Programming Paradigm என்பது ஒரு problem-ஐ program மூலம் எப்படி solve செய்ய வேண்டும் என்பதற்கான general style / approach / way of thinking. Simple Tamil: Program எப்படி எழுத வேண்டும், logic-ஐ எப்படி organize செய்ய வேண்டும் என்பதற்கான method…

Premium — locked Advanced 23 min 208 cards 20 programs 10 MCQs v2
This is a premium lesson. You can see the shape of every card — unlock to read them. Unlock

PROGRAMMING PARADIGMS AND MOD……

Premium This card is part of the premium lesson. Unlock
Definition

Programming Paradigm என்பது ஒரு problem-ஐ program மூலம் எப்படி solve செய்ய வேண்டும் என்பதற்கான general style ……

Premium This card is part of the premium lesson. Unlock
Definition

1. PARADIGM என்றால் என்ன?…

Premium This card is part of the premium lesson. Unlock
Definition

Paradigm என்ற சொல்லின் simple meaning: Model Pattern Style Approach Way of thinking Programming-ல்: Problem ↓……

Premium This card is part of the premium lesson. Unlock

LANGUAGE VS PARADIGM

Definition

இந்த இரண்டு terms-ஐ confuse ச……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

C++ = Programming Language Object-Oriented Programming = Paradigm ஆனால் C++ ஒரே paradigm மட்டும் su……

Premium This card is part of the premium lesson. Unlock

MAJOR PROGRAMMING PARADIGMS

Explanation

Programming paradigms broad-ஆக: Programming Paradigms | +-- Imperative | +-- Declarative இவற்றுக்குள் பல sub-……

Premium This card is part of the premium lesson. Unlock

IMPERATIVE PARADIGM

Definition

Imperative Programming என்பது computer ஒரு task செய்ய வேண்டிய exact sequence of commands-ஐ programmer step-by……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int sum = 0;…

Premium This card is part of the premium lesson. Unlock
Explanation

இங்கு program: sum initialize செய் ↓ i = 1 ↓ condition check செய் ↓……

Premium This card is part of the premium lesson. Unlock
List

1. WHY "IMPERATIVE"?…

Premium This card is part of the premium lesson. Unlock
Explanation

Imperative என்றால் command / ……

Premium This card is part of the premium lesson. Unlock
Real Life Example
Real-life example

ஒருவரிடம்: Door திற Room-க்கு போ Light on செய் Book எ……

Premium This card is part of the premium lesson. Unlock

CHARACTERISTICS OF IMPERATIVE PROGRAMMING

Real Life Example

Important characteristics: Statements Varia……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int x = 10;…

Premium This card is part of the premium lesson. Unlock
Explanation

Program state: Initially x = 10 Then x = 15 Then x = 30 S……

Premium This card is part of the premium lesson. Unlock

PROCEDURAL PROGRAMMING

Definition

Procedural Programming என்பது பெரிய program-ஐ small procedures / ……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

Student Management Program | +-- g……

Premium This card is part of the premium lesson. Unlock

PROCEDURAL PROGRAMMING EXAMPLE

Explanation

int add(int a, int b) { retur……

Premium This card is part of the premium lesson. Unlock

இங்கு: add() main() functions மூலம் pr……

Premium This card is part of the premium lesson. Unlock

PROCEDURAL PROGRAMMING FLOW

Main Program ↓ Function 1 ↓ F……

Premium This card is part of the premium lesson. Unlock

PROCEDURAL PROGRAMMING FEATURES

Functions / Procedures Top-down design Sequential execution Variables L……

Premium This card is part of the premium lesson. Unlock

TOP-DOWN APPROACH

Procedural programming பொதுவா……

Premium This card is part of the premium lesson. Unlock
Definition
Meaning

Big Problem ↓ Smaller Problem……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

Banking System ↓ Account Tran……

Premium This card is part of the premium lesson. Unlock

OBJECT-ORIENTED PARADIGM

Definition

Object-Oriented Programming (OOP) என்பது program-ஐ functions மட்டும் மையமாக அமைக்காமல், objects மற்றும் அவற்ற……

Premium This card is part of the premium lesson. Unlock
Definition

1. OBJECT என்றால்?…

Premium This card is part of the premium lesson. Unlock
Definition

Real-life: Car Car-க்கு properties: Color Speed Model Price Car செய்யும் actions: St……

Premium This card is part of the premium lesson. Unlock

CLASS

Definition

Class என்பது objects உருவாக்க……

Premium This card is part of the premium lesson. Unlock
Program
Example
Explanation

இதில் Student = class. Object……

Premium This card is part of the premium lesson. Unlock

OOP IMPORTANT CONCEPTS

Explanation

Class Object Encapsulation Abstrac……

Premium This card is part of the premium lesson. Unlock

OOP APPROACH

Explanation

Procedural: Function is important OOP: Object ……

Premium This card is part of the premium lesson. Unlock

OOP BOTTOM-UP APPROACH

Explanation

OOP பொதுவாக Bottom-Up Approach என்று exam-ல் குறிப்பிடப்படுகிறது. Small Objects……

Premium This card is part of the premium lesson. Unlock

PROCEDURAL VS OOP

DECLARATIVE PROGRAMMING

Definition

Declarative Programming என்பது problem எப்படி solve செய்ய வேண்டும் என்ற steps-ஐ specify செய்……

Premium This card is part of the premium lesson. Unlock

IMPERATIVE VS DECLARATIVE

Definition

Suppose database-ல் age > 18 students வேண்டும். Imperative thinking: Start from first student Check age If ag……

Premium This card is part of the premium lesson. Unlock

MEMORY TRICK

Definition

Imperative = HOW Declarative ……

Premium This card is part of the premium lesson. Unlock

FUNCTIONAL PROGRAMMING

Definition

Functional Programming என்பது computation-ஐ mathematical functions evaluation போல……

Premium This card is part of the premium lesson. Unlock

SIMPLE FUNCTIONAL IDEA

Definition

Traditional: int x = 10; x = x + 5; x = x * 2; இங்கு x repeatedly change ஆகிற……

Premium This card is part of the premium lesson. Unlock

PURE FUNCTION

Definition

Functional programming-ல் important concept: Pure Function ஒரு……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int square(int x) { return x ……

Premium This card is part of the premium lesson. Unlock

Output always: 25…

Premium This card is part of the premium lesson. Unlock

FUNCTIONAL PROGRAMMING FEATURES

First-class functions Higher-order functions Recursion Immutability Expression evalua……

Premium This card is part of the premium lesson. Unlock

LOGIC PROGRAMMING

Definition

Logic Programming என்பது facts மற்றும் rules கொடுத்து, sy……

Premium This card is part of the premium lesson. Unlock

LOGIC PROGRAMMING EXAMPLE

Definition

Facts: Human(Socrates) Rule: If someone is human, then that person is mortal. Formal idea: Human(x) → M……

Premium This card is part of the premium lesson. Unlock

LOGIC PROGRAMMING COMPONENTS

Definition

Facts Rules Queries Inference M……

Premium This card is part of the premium lesson. Unlock

EVENT-DRIVEN PROGRAMMING

Definition

இந்த paradigm syllabus-ல் lat……

Premium This card is part of the premium lesson. Unlock
Definition

Event-Driven Programming என்பது program execution user அல்லது system events……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

User clicks LOGIN button ↓ Cl……

Premium This card is part of the premium lesson. Unlock

EVENT HANDLER

Explanation

Event ஏற்பட்டதும் execute ஆகு……

Premium This card is part of the premium lesson. Unlock
Concept

buttonClicked() { login(); } GUI a……

Premium This card is part of the premium lesson. Unlock

CONCURRENT PROGRAMMING

Definition

Multiple tasks overlapping அல்லது simultane……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

ஒரு application: Download file Play music ……

Premium This card is part of the premium lesson. Unlock

PARALLEL PROGRAMMING

Explanation

Parallel programming-ல் multiple computations actual-ஆக same time-ல் mul……

Premium This card is part of the premium lesson. Unlock

CONCURRENT VS PARALLEL

Explanation

Exam-ல் இரண்டையும் same என்று……

Premium This card is part of the premium lesson. Unlock

GENERIC PROGRAMMING

Explanation

C++-க்கு மிகவும் important.…

Premium This card is part of the premium lesson. Unlock
Definition

ஒரே algorithm / code-ஐ different data types-க்கு reuse செய்……

Premium This card is part of the premium lesson. Unlock

GENERIC PROGRAMMING EXAMPLE

Definition

Without generic programming: int addInt(int a, int b) { return a + b; } double addDouble(double a, double b) ……

Premium This card is part of the premium lesson. Unlock

GENERIC PROGRAMMING IDEA

Definition

Algorithm ↓ Independent of specific data type ↓ Template ↓ Wo……

Premium This card is part of the premium lesson. Unlock
Definition

1. PROGRAMMING MODELS என்றால்……

Premium This card is part of the premium lesson. Unlock
Definition

இப்போது Paradigm மற்றும் Mode……

Premium This card is part of the premium lesson. Unlock
Definition

Programming Model என்பது computation எப்படி represent மற்றும் execute செய்யப்படுகிறது என்பதை விளக்கும் concep……

Premium This card is part of the premium lesson. Unlock

PARADIGM VS MODEL

IMPORTANT PROGRAMMING MODELS

Definition

Programming language theory-ல் commonly discussed models: Imperative ……

Premium This card is part of the premium lesson. Unlock

STATE-BASED MODEL

Definition

Imperative languages-ல் program ஒரு ……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int x = 5; State:…

Premium This card is part of the premium lesson. Unlock
Program
Then
Program
New state
Explanation

Flow: State 1 ↓ Statement State 2 ↓ Statement Stat……

Premium This card is part of the premium lesson. Unlock

VON NEUMANN MODEL

Explanation

Imperative programming languages-ன் traditional foundatio……

Premium This card is part of the premium lesson. Unlock

Program instructions மற்றும் ……

Premium This card is part of the premium lesson. Unlock
Concept

Memory ↕ CPU CPU: Fetch ↓ Decode ↓ Execute இந்த architec……

Premium This card is part of the premium lesson. Unlock

FUNCTIONAL MODEL

Concept

Functional model computation-ஐ……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

f(5) = 25 Input ↓ Function ↓ ……

Premium This card is part of the premium lesson. Unlock

LOGIC MODEL

Program
Logic model
Explanation

Then: Query ↓ Inference Engine ↓ Answe……

Premium This card is part of the premium lesson. Unlock

OBJECT MODEL

Explanation

Object model-ல் system: Objects + Messages / Method Calls + Interactions Customer Object ↓ ……

Premium This card is part of the premium lesson. Unlock

MESSAGE PASSING

Explanation

OOP model-ல் objects communication செய்ய method calls பயன்படுத்துகின்றன. account.deposit(5……

Premium This card is part of the premium lesson. Unlock

DATA-DRIVEN MODEL

Explanation

சில systems-ல் operations data avai……

Premium This card is part of the premium lesson. Unlock
Concept

Data arrives ↓ Processing starts ↓ New d……

Premium This card is part of the premium lesson. Unlock

DATAFLOW MODEL

Definition

ஒரு operation-க்கு required inputs available ஆனதும் அந்த operation execute ஆகும் comp……

Premium This card is part of the premium lesson. Unlock

DATAFLOW EXAMPLE

Definition

Suppose: A = B + C D = A × E Flow: B ----\ + → A ----……

Premium This card is part of the premium lesson. Unlock

RULE-BASED MODEL

Definition

System rules அடிப்படையில் act……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

IF temperature > 40 THEN display "High Tempera……

Premium This card is part of the premium lesson. Unlock

PROGRAMMING PARADIGMS - COMPLETE COMPARISON

IMPERATIVE VS FUNCTIONAL

OOP VS FUNCTIONAL

DECLARATIVE VS IMPERATIVE

Explanation

Imperative Tell computer HOW ……

Premium This card is part of the premium lesson. Unlock
Program
Example
Explanation

Example SQL: SELECT name FROM……

Premium This card is part of the premium lesson. Unlock

SINGLE-PARADIGM LANGUAGE

Explanation

ஒரு language mainly ஒரு particular paradigm-ஐ focus செய்தால்: Single-paradigm language ……

Premium This card is part of the premium lesson. Unlock

MULTI-PARADIGM LANGUAGE

Explanation

Multiple programming styles support செய்யும் langu……

Premium This card is part of the premium lesson. Unlock
List

1. WHY C++ IS MULTI-PARADIGM?…

Premium This card is part of the premium lesson. Unlock
Program
C++-ல்
Explanation

Modern C++: [] (int x) { return x*x; } lambda functions-……

Premium This card is part of the premium lesson. Unlock

C++ PARADIGM FLOW

Explanation

C++ | +-- Procedural | +-- Object-……

Premium This card is part of the premium lesson. Unlock
TRB Point
TRB exam point

C++ is a general-purpose, mul……

Premium This card is part of the premium lesson. Unlock

ADVANTAGES OF MULTI-PARADIGM PROGRAMMING

TRB Point

Different problems-க்கு diffe……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

Simple mathematical task ↓ Procedural Large business soft……

Premium This card is part of the premium lesson. Unlock

PROGRAMMING MODEL - STATE TRANSITION VIEW

Program
ஒரு imperative program
Program
Step 1
Program
Step 2
Program
Step 3
Explanation

இதனை: S0 → S1 → S2 → S3 என்று state transition model-ஆக represent ……

Premium This card is part of the premium lesson. Unlock
Important

Programming paradigm என்பது: Problem-solving style. Programming model என்பது: Computation/execu……

Premium This card is part of the premium lesson. Unlock
Memory Trick

I → Imperative → Instructions P → Procedural → Procedures O → OOP → Objects F → Functional → Functions L → Lo……

Premium This card is part of the premium lesson. Unlock
TRB Point

1. C++ is which type of progr……

Premium This card is part of the premium lesson. Unlock
TRB Point

Answer: Multi-paradigm progra……

Premium This card is part of the premium lesson. Unlock

Procedural programming follows:

TRB Point

Answer: Top-down approach.…

Premium This card is part of the premium lesson. Unlock

Object-oriented programming generally follows:

TRB Point

Answer: Bottom-up approach.…

Premium This card is part of the premium lesson. Unlock
TRB Point

1. Which paradigm focuses on ……

Premium This card is part of the premium lesson. Unlock
TRB Point

Answer: Object-Oriented Progr……

Premium This card is part of the premium lesson. Unlock
TRB Point

1. Which paradigm uses facts ……

Premium This card is part of the premium lesson. Unlock
TRB Point

Answer: Logic Programming.…

Premium This card is part of the premium lesson. Unlock

Prolog belongs to:

TRB Point

Answer: Logic programming par……

Premium This card is part of the premium lesson. Unlock

Haskell is mainly associated with:

TRB Point

Answer: Functional programmin……

Premium This card is part of the premium lesson. Unlock
TRB Point

1. Which paradigm specifies h……

Premium This card is part of the premium lesson. Unlock
TRB Point

Answer: Imperative paradigm.…

Premium This card is part of the premium lesson. Unlock
TRB Point

1. Which paradigm mainly spec……

Premium This card is part of the premium lesson. Unlock
TRB Point

Answer: Declarative paradigm.…

Premium This card is part of the premium lesson. Unlock

C++ templates support:

TRB Point

Answer: Generic programming.…

Premium This card is part of the premium lesson. Unlock
MCQ

A programming paradigm refers……

Premium This card is part of the premium lesson. Unlock
MCQ

Which is an imperative paradi……

Premium This card is part of the premium lesson. Unlock
MCQ

Which programming approach di……

Premium This card is part of the premium lesson. Unlock
MCQ

OOP primarily organizes a pro……

Premium This card is part of the premium lesson. Unlock
MCQ

Declarative programming mainl……

Premium This card is part of the premium lesson. Unlock
MCQ

Which language is traditional……

Premium This card is part of the premium lesson. Unlock
MCQ

Functional programming emphas……

Premium This card is part of the premium lesson. Unlock
MCQ

Templates in C++ mainly suppo……

Premium This card is part of the premium lesson. Unlock
MCQ

Which paradigm is mainly asso……

Premium This card is part of the premium lesson. Unlock
MCQ

The phrase "HOW to compute" i……

Premium This card is part of the premium lesson. Unlock
Common Mistake
Common error

Do not confuse: Procedural ≠ OOP Imperative ≠ Declarative Functional ≠ Procedural Concurrent ≠ Parallel Parad……

Premium This card is part of the premium lesson. Unlock
Summary

Programming Paradigm ↓ Program எழுதும் problem-solving style ↓ Two broad approaches | +---- Imperative | | | ……

Premium This card is part of the premium lesson. Unlock
Text size
17px
Theme
Contents
Print / PDF
Program