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

Introduction To Programming Paradigm Bsit 1a

Uploaded by

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

Introduction To Programming Paradigm Bsit 1a

Uploaded by

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

INTRODUCTION TO PROGRAMMING PARADIGMS

A Reporting in

Introduction to Computing

Presented to BSIT-1A and

Mr. Rovie R. Balingbing

January 22, 2024 (Monday)

11:30 AM – 12:30 PM

Prepared by: Group 2


Maria Louizza Pajarillon (Leader)
Aaron Jalbuena
Carla Mae Biñas
Stephen Christian Santos
Jade Carlo Redota
Prince Agustines
Harold Veleña
Avian Cayle Inciong
Loren Reformado
John Oliver Liwanag
Sharlene Mae Habito

INTRODUCTION TO
PROGRAMMING PARADIGMS
LEARNING OBJECTIVES:
 Define programming and the functions of different programming languages.
 Define programming paradigms and explain their role in software development.
 Name and describe the major programming paradigms
 Adapt to learning new paradigms as needed for specific tasks or projects.

I. INTRODUCTION
What is Programming? (Reporter: Carla Biñas)
Programming is a technological process of telling computer, which task to perform in
order to solve problem, execute operation through set of instruction or code.
There is a difference between programming and coding.
Programming is a mental process of thinking up instructions to give to the machine.
While coding is the process of transforming those idea into a written language that a
computer can understand.

How does computer programming work?


 First is a programmer writes a set of codes (numbers, letters and other characters)
 Second is a compiler converts each line of code into a language that a computer
can understand
 Third is the computer will scan the code and execute it. The computer will
perform a task like displaying images on webpage and changing it’s fonts and
color.

MOST USED PROGRAMMING LANGUAGE AMONG DEVELOPERS


WORLDWIDE AS OF 2023
As of 2022, JavaScript and HTML/CSS were the most commonly used programming
languages among software developers around the world, with more than 63.6 percent of
respondents stating that they used JavaScript and just around 53 percent using
HTML/CSS. Python, SQL, and TypeScript rounded out the top five most widely used
programming languages around the world.

JAVASCRIPT
This language is used on every major web browser. JavaScript allow us to add complex
features to web page. (Content update, interactive maps, animated graphics, developing
games, etc.…)
HTML/CSS
These languages are used to create web pages and web application. HTML (HyperText
Markup Language) can use to build web page structure while CSS (Cascading Style Sheets)
enable you to determine page styling.
PYTHON
Python is the most used in machine learning, web development and desktop applications.
Python is a popular language among beginners as the syntax is easy to learn. It also known as
an object- oriented programming language.

II. PROGRAMMING PARADIGMS


(Reporter: Louizza Pajarillon)
Paradigm can also be termed as method to solve some problem or do some task.
Programming paradigms shape how you approach challenges in code. They offer different
ways of thinking about data, control flow, and problem decomposition, leading to distinct
problem-solving strategies.
They provide a common language and set of guiding principles for programmers to
approach and solve problems while allowing for flexibility and adaptation within that
framework.
There are lots for programming language that are known but all of them need to follow
some strategy when they are implemented and this methodology/strategy is paradigms. Apart
from varieties of programming language there are lots of paradigms to fulfill each and every
demand.
III. TWO MAJOR PROGRAMMING PARADIGM

(1) IMPERATIVE PROGRAMMING PARADIGM (Reporter: Stephen Santos)


Imperative programming (from Latin imperare = command) is the oldest
programming paradigm. A program based on this paradigm is made up of a clearly-defined
sequence of instructions to a computer.
Therefore, the source code for imperative languages is a series of commands, which
specify what the computer has to do – and when – in order to achieve a desired result. Values
used in variables are changed at program runtime. To control the commands, control
structures such as loops or branches are integrated into the code.
Imperative programming languages are very specific, and operation is system-
oriented. On the one hand, the code is easy to understand; on the other hand, many lines of
source text are required to describe what can be achieved with a fraction of the commands
using declarative programming languages.

(A) Procedural Programming (Reporter: Loren Reformado)


Procedural programming revolves around a sequence of instructions given to the
computer. These sequences of instructions are known as procedures. Since the instructions
are carried out in well-defined sequences, we say that procedural programming takes a top-
down approach. In procedural programming, we divide our instructions into smaller blocks of
well-defined code. These code blocks are known as functions, where each function performs
a specific task.Used by computer languages like C, Basic, Fortran, Pascal, ALGOL etc.

Features:
1. Pre-defined Functions – They are often standardized instructions that are included in
the programming language itself, usually in standard libraries that are part of the
language.
2. Local Variable – A variable is a named location in the computer memory that is used
to store data. Local variables are those that are declared within a local scope. To
clarify, a local scope is a closed block or subsection of the program. The variables and
other named entities defined inside that block are not valid outside of that block.
3. Global Variable – A global variable can be used throughout the whole program since
it is declared outside of all the functions and scopes that are defined inside the
program.
4. Parameter Passing – Functions often work with data to give a certain result. Here, a
function is like a machine that takes data as input and spits out a single output. We
often supply such data input by passing them as parameters to a function. These
parameters could be variables, values, memory addresses, etc.
5. Modularity – This is the practice of using different functions and procedures
simultaneously to accomplish a single, greater task. Each procedure performs a
specific task that is different from other functions. But combining their results leads to
accomplishing the greater task.
6. Top-Down Approach – In this approach, the program is divided into smaller chunks
that are executed in a sequential manner.

(B) Object-Oriented Programming (Reporter: Harold Veleña)


The computer science programming paradigm known as object-oriented programming, or
OOP, is predicated on the idea of classes and objects. It is employed to divide a software program into
easily reusable, basic code blueprints known as classes that are then used to construct distinct
instances of various things. Programming languages that are object-oriented include JavaScript, C++,
Java, and Python.

Building blocks of an OOP:

 Classes
 Objects
 Attributes
 Methods

Key principles of object-oriented programming include:


Encapsulation: Encapsulation refers to the bundling of data (attributes) and the methods that operate
on that data into a single unit, i.e., a class. It helps in hiding the internal details of an object and
exposing only what is necessary.
Inheritance: Inheritance allows a class (subclass or derived class) to inherit the properties and
behaviors of another class (superclass or base class). This promotes code reuse and establishes a
hierarchy of classes.
Polymorphism: Polymorphism allows objects of different classes to be treated as objects of a
common base class. It enables methods to be defined in a general way that can be overridden in
specific classes to provide specialized implementations.
Abstraction: Abstraction involves simplifying complex systems by modeling classes based on the
essential properties and behaviors relevant to the problem at hand. It allows developers to focus on the
high-level design without getting into the unnecessary details.

(C) PARALLEL PROCESSING APPROACH (Reporter: Jade Redota)


A computing technique when multiple streams of calculations or data processing tasks
co-occur through numerous central processing units (CPUs) working concurrently. Systems
can slash a program’s execution time by dividing a task’s many parts among several
processors. Multi-core processors, frequently found in modern computers, and any system
with more than one CPU are capable of performing parallel processing.

How Does Parallel Processing Work?


It use two or more processors or CPUs simultaneously to handle various components of
a single activity. A parallel processing system can process data simultaneously to complete
tasks more quickly. For instance, the system could receive the next instruction from memory
as the current instruction is processed by the CPU’s arithmetic-logic unit (ALU). The main
goal of parallel processing is to boost a computer’s processing power and increase
throughput, or the volume of work one can do in a given time. One can use many functional
units to create a parallel processing system by carrying out similar or dissimilar activities
concurrently.

(2) DECLARTIVE PROGRAMMING PARADIGM (John Oliver Liwanag)


A high-level programming concept, which is the opposite of imperative programming.
It is generally used in databases and configuration management software.
Declarative programming is a paradigm that focuses on what to achieve rather than
how to achieve it. In other words, you tell the computer what you want and let it figure out
how to do it. Declarative programming is usually used along with a domain-specific language
(DSL) to express what the user wants and shield them from low-level constructs that
materialize the end state which is desired.
(A)LOGIC PROGRAMMING (Reporter: Sharlene Habito)
Logic programming is a programming, database and knowledge representation
paradigm based on formal logic. A logic program is a set of sentences in logical form,
representing knowledge about some problem domain. Computation is performed by applying
logical reasoning to that knowledge, to solve problems in the domain. Major logic
programming language families include Prolog, Answer Set Programming (ASP) and
Datalog.
In order for computer programs to make use of logic programming, there must be a
base of existing logic, called predicates.
Predicates are used to build atomic formulas or atoms, which state true facts. It is
used to create formulas and perform queries. Logic languages most often rely on queries in
order to display relevant data. These queries can exist as part of machine learning, which can
be run without the need for manual intervention.

(B) FUNCTIONAL PROGRAMMING (Prince Agustines)


Functional programming is a paradigm of building computer programs using
expressions and functions without mutating state and data. By respecting these restrictions,
functional programming aims to write code that is clearer to understand and more bug
resistant.
A pure function is one that delivers the same result every single time given the same
set of inputs. Importantly, these functions do not produce side effects, meaning they do not
alter any state outside the function or rely on data that changes.

(C) DATABASE PROGRAMMING (Aaron Jalbuena)


Focuses on interacting with databases, including tasks such as querying, updating, and
modifying the database. Involves writing code that enables the creation, management, and
utilization of databases. Typically applied to streams of structured data, such as log files,
delimiter-separated values, or email messages, for filtering, transforming, aggregating, or
calling other programs
Examples of database programming languages include SQL, MySQL, and
PostgreSQL.

IV. CONCLUSION
(Reporter: Avian Cayle Inciong)
Programming paradigms are a way to classify programming languages based on their
features. Languages can be classified into multiple paradigms.
Some paradigms are concerned mainly with implications for the execution model of
the language, such as allowing side effects, or whether the sequence of operations is defined
by the execution model. Other paradigms are concerned mainly with the way that code is
organized, such as grouping a code into units along with the state that is modified by the
code.

REFERENCES
 https://en.m.wikipedia.org/wiki/Programming_paradigm
 http://www.catb.org/~esr/writings/taoup/html/ch09s01.html
 https://en.wikipedia.org/wiki/Data-driven_programming
 https://codeinstitute.net/global/blog/database-programming/
 https://www.infoq.com/articles/data-oriented-programming-java/
 https://stackoverflow.com/questions/1065584/what-is-data-driven-programming
 https://www.google.com/url?sa=i&url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fagiliway.medium.com
%2Ffunctional-and-object-oriented-programming-key-features-and-differences-
f348c5b5dc04&psig=AOvVaw25R3JZ9gRSrNWfL4HvNJBB&ust=17059269081
80000&source=images&cd=vfe&opi=89978449&ved=0CBMQjRxqFwoTCIDInZ
W_7oMDFQAAAAAdAAAAABAD
 https://www.google.com/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwi0
rbuKve6DAxVnxDgGHaPvArYQFnoECBQQAw&url=https%3A%2F
%2Fwww.linkedin.com%2Fpulse%2Fhigher-order-function-amit-nadiger
%23%3A~%3Atext%3DHigher%252Dorder%2520functions%2520(HOFs)
%2Csupport%2520for%2520higher%252Dorder
%2520functions.&usg=AOvVaw0E3w3RqeDMu87dLbKpF7YT&opi=899784
 https://www.infoworld.com/article/3613715/what-is-functional-programming-a-
practical-guide.html
 https://www.google.com/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwj
pq5iGu-6DAxX1zTgGHbW7DI0QFnoECBMQAw&url=https%3A%2F
%2Fadabeat.com%2Ffp%2Fimmutability-in-functional-programming%2F
%23%3A~%3Atext%3DAt%2520its%2520core%252C%2520immutability
%2520in%2Cand%2520often%2520unpredictable%2520program
%2520behavior.&usg=AOvVaw0T0hzd1zhoZuMqnxpHaXbT&opi=89978449
 https://www.google.com/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwje
i8SAuu6DAxUO6zgGHbiaBFcQFnoECBUQAw&url=https%3A%2F
%2Fwww.geeksforgeeks.org%2Fpure-functions%2F%23%3A~%3Atext%3DA
%2520function%2520is%2520called%2520pure%2Cpow()%252C%2520sqrt()
%2520etc.&usg=AOvVaw3C1T7S-_pEVR3o-THf9zvN&opi=89978449
 https://www.learncomputerscienceonline.com/procedural-programming/
 https://programiz.pro/resources/what-is-procedural-programming/
 https://www.studysmarter.co.uk/explanations/computer-science/computer-
programming/parameter-passing/#:~:text=Pass%20by%20value%3A%20Since
%20a,original%20parameter%20value%20remains%20unchanged.
 https://en.m.wikipedia.org/wiki/Programming_paradigm
 http://www.catb.org/~esr/writings/taoup/html/ch09s01.html
 https://en.wikipedia.org/wiki/Data-driven_programming
 https://codeinstitute.net/global/blog/database-programming/
 https://www.infoq.com/articles/data-oriented-programming-java/
 https://stackoverflow.com/questions/1065584/what-is-data-driven-programmin

You might also like