Professional Documents
Culture Documents
INTRODUCTION
• Definition of terms
• Programming languages
• Programming paradigms
• Generations of programming languages
• Compilers and Interpreters
2/26/21 CS102
Definition of terms
A Computer Program
• a set of instructions written using a programming
language that a computer must follow step by step to
execute a particular task.
• a set of instructions written in logical sequence for a
computer to perform a certain task.
• These instructions enable a computer to carry out a
specific task.
2/26/21 CS102
Definition of terms
Computer Programming
• Computer programming is defined as the science of making
computer programs.
• The art of designing and coding or writing computer programs.
• A computer program when fully developed becomes a software.
• Software is created through a process known as software
development.
Computer programmer
• A programmer is the person who writes programs that can be
executed by the computer.
2/26/21 CS102
Programming languages
• Programs are writing in some specific languages
known as the programming languages.
• Programming languages evolved much earlier in
time than we may think of .
• From the history and evolution of computers,
find out when programming was introduced?
• Find the history of programming languages and
give an account?
2/26/21 CS102
Programming languages
• English is a natural language. It has words,
symbols and grammatical rules.
• A programming language also has words,
symbols and rules of grammar.
• The grammatical rules are called syntax.
• Each programming language has a different
set of syntax rules.
2/26/21 CS102
Programming Paradigms
• A programming paradigm is pattern that serves as a
school of thoughts for programming of computers.
• a fundamental style of computer programming.
There several programming paradigms, here we are
going to look at the following four paradigms:
1. Procedural programming Paradigm.
2. Object Oriented Programming Paradigm.
3. Event Driven Programming Paradigm.
4. Declarative Programming Paradigm.
2/26/21 CS102
Procedural programming
• This can sometimes be used as a synonym for imperative programming, but
can also refer to a programming paradigm based upon the concept of the
procedure call.
• Procedures, also known as routines, subroutines, methods, or functions
simply contain a series of computational steps to be carried out.
• Any given procedure might be called at any point during a program's
execution, including by other procedures or itself.
• A procedural programming language provides a programmer a means to
define precisely each step in the performance of a task.
• The programmer knows what is to be accomplished and provides through
the language step-by-step instructions on how the task is to be done.
• The languages that follow this includes :
– Pascal, C, fortran etc
2/26/21 CS102
Object Oriented Programming
• In object-oriented programming, programmers can think of a program as
a collection of interacting objects.
• It uses "objects" i.e. data structures consisting of data fields and methods
together with their interactions to design applications and computer
programs.
• In these languages data, and methods of manipulating the data, are kept
as a single unit called an object.
• The only way that a user can access the data is via the object's 'methods'
(subroutines)/functions.
• The programming technique includes features such as data abstraction,
encapsulation, modularity, polymorphism, and inheritance.
• Examples include Object Pascal, C++, C#, Visual Basic, Common Lisp,
Scheme, Perl, Python, Ruby, Java, VB.Net etc.
2/26/21 CS102
Event Driven Programming
• This is a programming paradigm in which the
flow of the program is determined by events
i.e., sensor outputs or user actions (mouse
clicks, key presses) or messages from other
programs or threads.
• Languages that follow this paradigm includes:
– SQL (Structured Query Language)
– VB (Visual Basic)
– JAVA
2/26/21 CS102
Declarative Programming
• In these languages the computer is told what the problem is, not
how to solve the problem .
• The program is structured as a collection of properties to find in
the expected result, not as a procedure to follow.
• Given a database or a set of rules, the computer tries to find a
solution matching all the desired properties.
• The typical example of a declarative language is the fourth
generation language SQL, as well as the family of functional
languages and logic programming.
• The most common examples of declarative languages are logic
programming languages such as Prolog and functional languages
like Haskell.
2/26/21 CS102
Generations Programming Languages
2/26/21 CS102
First Generation
2/26/21 CS102
Third Generation
2/26/21 CS102
Fourth Generation
2/26/21 CS102
Fifth Generation
2/26/21 CS102