Unit 2: Programming Paradigms
Sherin Rappai
Assistant Professor
Department of Computer Science
What is a computer program
• A computer program is a set of instructions for a computer to perform a task which is
written using a programming language. A programming paradigm can categorize the
programming language depending on language features.
• Types of Programming Paradigm
• Structured programming and Unstructured programming are two common programming
paradigms. The key difference between Structured and Unstructured programming is that
• Structured programming allows the programmer to divide the whole program into
modules or functions and in
• Unstructured programming, the code is written as one block.
What is structured programming
• In Structured Programming, is a type of programming that generally converts large or
complex programs into more manageable and small pieces of code.
• The code is divided into functions or modules. It is also known as modular
programming. Modules or functions are a set of statements which performs a sub task.
• As each task is a separate module, it is easy for the programmer to test and debug. It is
also easy to do modifications without changing the whole program.
• When changing the code, the programmer has to concentrate only on the specific module.
• C language and Pascal are some examples of Structural Programming languages.
A programming language
like C can use user-defined
functions. Functions are
called by the main
program. Variables in the
functions are called local
variables, and global
variables can be accessed
by all the functions.
Structured programming
languages also use
selections (if/ else) and
iterations (for /do, while).
Types of structured programming
• There are three categories of structured programming:
• Procedural programming. Defines modules as procedures or functions that are called with a set
of parameters to perform a task. A procedural language begins a process, which is then given data.
• Object-oriented programming (OOP). Defines a program as a set of objects or resources to
which commands are sent. An object-oriented language defines a data resource and sends it to
process commands.
• Model-based programming. The most common example of this is database query languages. In
database programming, units of code are associated with steps in database access and update or run
when those steps occur.
What is unstructured programming
• Unstructured Programming is a type of programming that generally executes in sequential order
i.e., these programs just not jumped from any line of code and each line gets executed sequentially.
• It is also known as non-structured programming that is capable of creating turning-complete
algorithms.
• In Unstructured Programming, the code is written as a single whole block. The whole program is
taken as a single unit. It is harder to do changes in the program.
• This paradigm was used in earlier versions of BASIC, COBOL, and FORTRAN. Unstructured
programming languages have a limited number of data types like numbers, arrays, strings.
Output :
Addition = 15
Subtraction = 5
Difference between structured and unstructured
programming
Object Oriented Programming
• Object-Oriented Programming or OOPs refers to languages that use objects in
programming. Object-oriented programming aims to implement real-world entities
like inheritance, hiding, polymorphism, etc in programming.
• The main aim of OOP is to bind together the data and the functions that operate on
them so that no other part of the code can access this data except that function.
• OOPs Concepts:
• Class
• Objects
• Data Abstraction
• Encapsulation
• Inheritance
• Polymorphism
This Photo by Unknown Author is licensed under CC BY-SA-NC
Class
• A class is a user-defined data type. It consists of data members and member
functions, which can be accessed and used by creating an instance of that class.
• It represents the set of properties or methods that are common to all objects of one
type. A class is like a blueprint for an object.
• For Example: Consider the Class of Cars. There may be many cars with different
names and brands but all of them will share some common properties like all of
them will have 4 wheels, Speed Limit, Mileage range, etc. So here, Car is the
class, and wheels, speed limits, mileage are their properties.
Object
• It is a basic unit of Object-Oriented Programming and represents the real-life entities. An Object is
an instance of a Class. When a class is defined, no memory is allocated but when it is instantiated
(i.e. an object is created) memory is allocated.
• An object has an identity, state, and behavior. Each object contains data and code to manipulate the
data. Objects can interact without having to know details of each other’s data or code, it is
sufficient to know the type of message accepted and type of response returned by the objects.
• For example “Dog” is a real-life Object, which has some characteristics like color, Breed, Bark,
Sleep, and Eats.
Data Abstraction
• Data abstraction is one of the most essential and important features of object-oriented
programming. Data abstraction refers to providing only essential information about the
data to the outside world, hiding the background details or implementation.
• Consider a real-life example of a man driving a car. The man only knows that pressing the
accelerators will increase the speed of the car or applying brakes will stop the car, but he
does not know about how on pressing the accelerator the speed is increasing, he does not
know about the inner mechanism of the car or the implementation of the accelerator,
brakes, etc in the car. This is what abstraction is.
Encapsulation
• Encapsulation is defined as the wrapping up of data under a single unit. It is the
mechanism that binds together code and the data it manipulates.
• In Encapsulation, the variables or data of a class are hidden from any other class
and can be accessed only through any member function of their class in which
they are declared.
• Encapsulation is a method for protecting data from unwanted access or alteration
by packaging it in an object where it is only accessible through the object's
interface. Encapsulation are often referred to as information hiding.
• As in encapsulation, the data in a class is hidden from other classes, so it is also
known as data-hiding.
Inheritance
• Inheritance is an important pillar of OOP(Object-Oriented Programming). The capability of a class
to derive properties and characteristics from another class is called Inheritance. When we write a
class, we inherit properties from other classes.
• So when we create a class, we do not need to write all the properties and functions again and again,
as these can be inherited from another class that possesses it. Inheritance allows the user to reuse
the code whenever possible and reduce its redundancy.
Polymorphism
• The word polymorphism means having many forms. In simple words, we can
define polymorphism as the ability of a message to be displayed in more than one
form.
• For example, A person at the same time can have different characteristics. Like a
man at the same time is a father, a husband, an employee. So the same person
posses different behavior in different situations. This is called polymorphism.
Characteristics of good computer program
 A good programming language must be simple and easy to learn and use.
Characteristics:
 Portability: application to run on different platforms (operating systems)
 Readability: More user-friendly approach. The program should be written in such a way that it makes other programmers or
users to follow the logic of the program without much effort.
 Efficiency: Every program requires certain processing time and memory to process the instructions and data. As the
processing power and memory are the most precious resources of a computer, a program should be laid out in such a
manner that it utilizes the least amount of memory and processing time.
 Structural: To develop a program, the task must be broken down into a number of subtasks.
 Flexibility: A program should be flexible enough to handle most of the changes without having to rewrite the entire program.
Most of the programs are developed for a certain period and they require modifications from time to time.
 For example, in case of payroll management, as the time progresses, some employees may leave the company while some others may
join. Hence, the payroll application should be flexible enough to incorporate all the changes without having to reconstruct the entire
application.
 Generality: Apart from flexibility, the program should also be general. Generality means that if a
program is developed for a particular task, then it should also be used for all similar tasks of the
same domain. For example, if a program is developed for a particular organization, then it should
suit all the other similar organizations.
 Documentation: Documentation is one of the most important components of an application
development. Even if a program is developed following the best programming practices, it will be
rendered useless if the end user is not able to fully utilize the functionality of the application. A
well-documented application is also useful for other programmers because even in the absence of
the author, they can understand it.
 Compactness :- In a good programming language, programmers should be able to express
intended operations concisely. A verbose language is generally not liked by programmers,
because they need to write too much.
Computer Language
Humans can’t directly communicate with computers
Assembler
Compiler
Interpreter
Line by Line interpretation
Linker and Loader
• In the execution of the program, major role is played by two utility programs
known as Linker and Loader.
• Linker: A linker is special program that combines the object files, generated by
compiler/assembler and other pieces of code to originate an executable file has
.exe extension. In the object file, linker searches and append all libraries needed
for execution of file. It also merges two or more separate object programs and
establishes link among them.
Loader
• Loader: It is special program that takes input of executable files from linker, loads
it to main memory, and prepares this code for execution by computer. Loader
allocates memory space to program.
Difference between Linker and Loader
The different generations of languages
• First generation languages (abbreviated as 1GL)
Represents the very early, primitive computer languages that consisted entirely of 1's and 0's - the actual language that the computer
understands (machine language).
• Second generation languages (2GL)
Represents a step up from the first generation languages. Allow for the use of symbolic names instead of just numbers. Second generation
languages are known as assembly languages. Code written in an assembly language is converted into machine language (1GL).
• Third generation languages (3GL)
With the languages introduced by the third generation of computer programming, words and commands (instead of just symbols and
numbers) were being used. These languages therefore, had syntax that was much easier to understand. Third generation languages are known
as "high level languages" and include C, C++, Java, and JavaScript, among others.
• Fourth generation languages (4GL)
The syntax used in 4GL is very close to human language, an improvement from the previous generation of languages. 4GL languages are
typically used to access databases and include SQL and ColdFusion, among others.
• Fifth generation languages (5GL)
Fifth generation languages are currently being used for neural networks. A neural network is a form of artificial intelligence that attempts to
imitate how the human mind works.
Machine Language
 Machine Language is also known as the First Generation Programming Language (1GL).
 In simple words, a Computer is a cluster of millions and millions of switches, which
can be either turned ON or OFF at a very high rate.
 These two states (ON and OFF) can also be defined as 1 and 0 which is called Binary Code.
 A computer just understands the language of 0s and 1s (Binary Code).
 Since Machine Language doesn’t need a Compiler, Interpreter, or any type of program to convert its code. So, it is
the fastest Programming Language.
 However, working with Machine Language is not an easy task. As you need a good understanding of the
architecture of the CPU and its working.
 Here is a simple example of Machine Language or Binary Code – 00000001 00010000 00000100 01000000.
 1GL
 Low level language
 First closest language to
computer
 Two states – on, off
 Binary code – 0’s & 1’s
 No need compiler, interpreter for
conversion – faster
 Understand the CPU working
 Ex. Binary code -01011010
Assembly Language
 Assembly Language is also known as Second Generation Programming Language (2GL).
 It is another Low-Level Programming Language and the second closest language to the
Computer.
 Assembly Language is slower as compared to the Machine Language. However, it is very fast
when compared to High-Level Programming Languages (like – C, C++, Java).
 Unlike Machine Language, the Assembly Language need a program (called Assembler) to
convert its Assembly Code to Machine Code.
 Programming in Assembly Language is comparatively much easier as compared to working with
Machine Language.
 2GL
 Low level language
 Second closest language to computer
 Slower than machine lang.
 Faster than high level lang.
 Need Assembler for conversion
 Working with assembly easy than machine
 Ex. MOV, SUB
Procedural-Oriented Programming
• Procedural-Oriented Programming is also known as Third Generation
Programming Language (3GL).
• It is one of the primitive and important paradigms in the Programming
Industry.
• In Procedural-Oriented Programming, instead of focusing on data, we majorly
focus on the procedure of the program.
• The main goal of Procedural-Oriented Programming is to solve a problem.
• So, data is the second priority in Procedural-Oriented Programming, as a
result, this Programming Paradigm is comparatively less secure.
• In Procedural Oriented Programming, we create a number of statements in
order to solve any problem. It uses a Top-Down approach in order to solve
any problem.
• However, it is very important to maintain the order of every step or statement.
Therefore, we make use of functions in Procedural-Oriented Programming.
• Procedural-Oriented Programming is a much unrealistic approach to solve a
problem as compared to other Programming Paradigm.
• Examples of Procedural-Oriented Programming Language: Basic, Fortran, C,
Pascal, and COBOL.
 3GL
 high level language
 Focus procedure instead of data
 Goal – solve the problem
 Less secure
 Use Top down approach – solve any pro
 Step by step procedure follow
 Need compiler for conversion
 Working with assembly easy than mach
 Ex. Basic, Fortran, C, Pascal, and COBOL.
Natural Programming Language
• Ordinary human language like English
• Programming language that use human language to give people a more
natural connection with computers.
• It is designed to make the computer solve a given problem without the
programmer.
• It is the part of the field of study known as AI.
Visual Programming Language
• Visual programming language (VPL) is a programming
language that uses graphical elements and figures to
develop a program rather than textually.
• Visual programming language is also known as executable
graphics language.
• The graphics or icons included within a visual program
serve as input, activities, connections and/or output of the
program.
• UML are popular examples of visual programming
languages
Scripting Language
• Scripting Language is the Programing Language which is used for
performing automation or repetitive task with the help of scripts.
• Unlike, other Programming Languages, Scripting Languages are Run-Time
Programming Languages.
• Web Automation or Web Scripting is one of the applications of Scripting
Language.
• You can also automate your daily task on a computer, with the help of Shell
Script or Bash Script, which is another most popular example of Scripting
Language.
• Examples of Scripting Programming Language: Bash, JavaScript, Shell,
Python, and Perl.
HyperText Markup Language
• Used to add functionality to a Web page, such as different menu styles or graphic displays or to serve
dynamic advertisements.
• These types of languages are client-side scripting languages, affecting the data that the end user sees in a
browser window.
• Other scripting languages are server-side scripting languages that manipulate the data, usually in a
database, on the server.
• Scripting languages came about largely because of the development of the Internet as a communications
tool. JavaScript, ASP, JSP, PHP, Perl, Tcl and Python are examples of scripting languages.
• Definition of HTML
• HTML (Hypertext Markup Language) is the set of markup symbols or codes inserted in a file
intended for display on a World Wide Web browser page.
• The markup tells the Web browser how to display a Web page's words and images for the user.
• Each individual markup code is referred to as an element (but many people also refer to it as a tag).
Some elements come in pairs that indicate when some display effect is to begin and when it is to end.
• Example1:
• <html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
Extensible Markup Language(XML)
• Definition of XML
• Extensible Markup Language (XML) is used to describe data. The XML standard is a flexible way to create
information formats and electronically share structured data via the public Internet, as well as via corporate networks.
• Difference between HTML and XML
• 1. HTML was designed to display data with focus on how data looks while XML was designed to be a software and
hardware independent tool used to transport and store data, with focus on what data is.
2. HTML is a markup language itself while XML provides a framework for defining markup languages.
3. HTML is a presentation language while XML is neither a programming language nor a presentation language.
4. HTML is case insensitive while XML is case sensitive.
5. HTML is used for designing a web-page to be rendered on the client side while XML is used basically to transport
data between the application and the database.
6. HTML has its own predefined tags while what makes XML flexible is that custom tags can be defined and the tags are
invented by the author of the XML document.
7. HTML is not strict if the user does not use the closing tags but XML makes it mandatory for the user the close each tag
that has been used.
8. HTML does not preserve white space while XML does.
Features of Good Programming Language
• A programming language must be simple, easy to learn and use, have good readability, and be human recognizable.
• Abstraction is a must-have Characteristics for a programming language in which the ability to define the complex structure
and then its degree of usability comes.
• A portable programming language is always preferred.
• Programming language’s efficiency must be high so that it can be easily converted into a machine code and executed
consumes little space in memory.
• A programming language should be well structured and documented so that it is suitable for application development.
• Necessary tools for the development, debugging, testing, maintenance of a program must be provided by a programming
language.
• A programming language should provide a single environment known as Integrated Development Environment(IDE).
• A programming language must be consistent in terms of syntax

Unit 2.pptx

  • 1.
    Unit 2: ProgrammingParadigms Sherin Rappai Assistant Professor Department of Computer Science
  • 2.
    What is acomputer program • A computer program is a set of instructions for a computer to perform a task which is written using a programming language. A programming paradigm can categorize the programming language depending on language features. • Types of Programming Paradigm • Structured programming and Unstructured programming are two common programming paradigms. The key difference between Structured and Unstructured programming is that • Structured programming allows the programmer to divide the whole program into modules or functions and in • Unstructured programming, the code is written as one block.
  • 3.
    What is structuredprogramming • In Structured Programming, is a type of programming that generally converts large or complex programs into more manageable and small pieces of code. • The code is divided into functions or modules. It is also known as modular programming. Modules or functions are a set of statements which performs a sub task. • As each task is a separate module, it is easy for the programmer to test and debug. It is also easy to do modifications without changing the whole program. • When changing the code, the programmer has to concentrate only on the specific module. • C language and Pascal are some examples of Structural Programming languages.
  • 4.
    A programming language likeC can use user-defined functions. Functions are called by the main program. Variables in the functions are called local variables, and global variables can be accessed by all the functions. Structured programming languages also use selections (if/ else) and iterations (for /do, while).
  • 5.
    Types of structuredprogramming • There are three categories of structured programming: • Procedural programming. Defines modules as procedures or functions that are called with a set of parameters to perform a task. A procedural language begins a process, which is then given data. • Object-oriented programming (OOP). Defines a program as a set of objects or resources to which commands are sent. An object-oriented language defines a data resource and sends it to process commands. • Model-based programming. The most common example of this is database query languages. In database programming, units of code are associated with steps in database access and update or run when those steps occur.
  • 6.
    What is unstructuredprogramming • Unstructured Programming is a type of programming that generally executes in sequential order i.e., these programs just not jumped from any line of code and each line gets executed sequentially. • It is also known as non-structured programming that is capable of creating turning-complete algorithms. • In Unstructured Programming, the code is written as a single whole block. The whole program is taken as a single unit. It is harder to do changes in the program. • This paradigm was used in earlier versions of BASIC, COBOL, and FORTRAN. Unstructured programming languages have a limited number of data types like numbers, arrays, strings.
  • 7.
    Output : Addition =15 Subtraction = 5
  • 8.
    Difference between structuredand unstructured programming
  • 10.
    Object Oriented Programming •Object-Oriented Programming or OOPs refers to languages that use objects in programming. Object-oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism, etc in programming. • The main aim of OOP is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function.
  • 11.
    • OOPs Concepts: •Class • Objects • Data Abstraction • Encapsulation • Inheritance • Polymorphism This Photo by Unknown Author is licensed under CC BY-SA-NC
  • 12.
    Class • A classis a user-defined data type. It consists of data members and member functions, which can be accessed and used by creating an instance of that class. • It represents the set of properties or methods that are common to all objects of one type. A class is like a blueprint for an object. • For Example: Consider the Class of Cars. There may be many cars with different names and brands but all of them will share some common properties like all of them will have 4 wheels, Speed Limit, Mileage range, etc. So here, Car is the class, and wheels, speed limits, mileage are their properties.
  • 13.
    Object • It isa basic unit of Object-Oriented Programming and represents the real-life entities. An Object is an instance of a Class. When a class is defined, no memory is allocated but when it is instantiated (i.e. an object is created) memory is allocated. • An object has an identity, state, and behavior. Each object contains data and code to manipulate the data. Objects can interact without having to know details of each other’s data or code, it is sufficient to know the type of message accepted and type of response returned by the objects. • For example “Dog” is a real-life Object, which has some characteristics like color, Breed, Bark, Sleep, and Eats.
  • 14.
    Data Abstraction • Dataabstraction is one of the most essential and important features of object-oriented programming. Data abstraction refers to providing only essential information about the data to the outside world, hiding the background details or implementation. • Consider a real-life example of a man driving a car. The man only knows that pressing the accelerators will increase the speed of the car or applying brakes will stop the car, but he does not know about how on pressing the accelerator the speed is increasing, he does not know about the inner mechanism of the car or the implementation of the accelerator, brakes, etc in the car. This is what abstraction is.
  • 15.
    Encapsulation • Encapsulation isdefined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. • In Encapsulation, the variables or data of a class are hidden from any other class and can be accessed only through any member function of their class in which they are declared. • Encapsulation is a method for protecting data from unwanted access or alteration by packaging it in an object where it is only accessible through the object's interface. Encapsulation are often referred to as information hiding. • As in encapsulation, the data in a class is hidden from other classes, so it is also known as data-hiding.
  • 16.
    Inheritance • Inheritance isan important pillar of OOP(Object-Oriented Programming). The capability of a class to derive properties and characteristics from another class is called Inheritance. When we write a class, we inherit properties from other classes. • So when we create a class, we do not need to write all the properties and functions again and again, as these can be inherited from another class that possesses it. Inheritance allows the user to reuse the code whenever possible and reduce its redundancy.
  • 17.
    Polymorphism • The wordpolymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. • For example, A person at the same time can have different characteristics. Like a man at the same time is a father, a husband, an employee. So the same person posses different behavior in different situations. This is called polymorphism.
  • 20.
    Characteristics of goodcomputer program  A good programming language must be simple and easy to learn and use. Characteristics:  Portability: application to run on different platforms (operating systems)  Readability: More user-friendly approach. The program should be written in such a way that it makes other programmers or users to follow the logic of the program without much effort.  Efficiency: Every program requires certain processing time and memory to process the instructions and data. As the processing power and memory are the most precious resources of a computer, a program should be laid out in such a manner that it utilizes the least amount of memory and processing time.  Structural: To develop a program, the task must be broken down into a number of subtasks.  Flexibility: A program should be flexible enough to handle most of the changes without having to rewrite the entire program. Most of the programs are developed for a certain period and they require modifications from time to time.  For example, in case of payroll management, as the time progresses, some employees may leave the company while some others may join. Hence, the payroll application should be flexible enough to incorporate all the changes without having to reconstruct the entire application.
  • 21.
     Generality: Apartfrom flexibility, the program should also be general. Generality means that if a program is developed for a particular task, then it should also be used for all similar tasks of the same domain. For example, if a program is developed for a particular organization, then it should suit all the other similar organizations.  Documentation: Documentation is one of the most important components of an application development. Even if a program is developed following the best programming practices, it will be rendered useless if the end user is not able to fully utilize the functionality of the application. A well-documented application is also useful for other programmers because even in the absence of the author, they can understand it.  Compactness :- In a good programming language, programmers should be able to express intended operations concisely. A verbose language is generally not liked by programmers, because they need to write too much.
  • 22.
  • 26.
    Humans can’t directlycommunicate with computers
  • 30.
  • 31.
  • 32.
  • 33.
    Linker and Loader •In the execution of the program, major role is played by two utility programs known as Linker and Loader. • Linker: A linker is special program that combines the object files, generated by compiler/assembler and other pieces of code to originate an executable file has .exe extension. In the object file, linker searches and append all libraries needed for execution of file. It also merges two or more separate object programs and establishes link among them.
  • 34.
    Loader • Loader: Itis special program that takes input of executable files from linker, loads it to main memory, and prepares this code for execution by computer. Loader allocates memory space to program.
  • 35.
  • 36.
    The different generationsof languages • First generation languages (abbreviated as 1GL) Represents the very early, primitive computer languages that consisted entirely of 1's and 0's - the actual language that the computer understands (machine language). • Second generation languages (2GL) Represents a step up from the first generation languages. Allow for the use of symbolic names instead of just numbers. Second generation languages are known as assembly languages. Code written in an assembly language is converted into machine language (1GL). • Third generation languages (3GL) With the languages introduced by the third generation of computer programming, words and commands (instead of just symbols and numbers) were being used. These languages therefore, had syntax that was much easier to understand. Third generation languages are known as "high level languages" and include C, C++, Java, and JavaScript, among others. • Fourth generation languages (4GL) The syntax used in 4GL is very close to human language, an improvement from the previous generation of languages. 4GL languages are typically used to access databases and include SQL and ColdFusion, among others. • Fifth generation languages (5GL) Fifth generation languages are currently being used for neural networks. A neural network is a form of artificial intelligence that attempts to imitate how the human mind works.
  • 37.
    Machine Language  MachineLanguage is also known as the First Generation Programming Language (1GL).  In simple words, a Computer is a cluster of millions and millions of switches, which can be either turned ON or OFF at a very high rate.  These two states (ON and OFF) can also be defined as 1 and 0 which is called Binary Code.  A computer just understands the language of 0s and 1s (Binary Code).  Since Machine Language doesn’t need a Compiler, Interpreter, or any type of program to convert its code. So, it is the fastest Programming Language.  However, working with Machine Language is not an easy task. As you need a good understanding of the architecture of the CPU and its working.  Here is a simple example of Machine Language or Binary Code – 00000001 00010000 00000100 01000000.  1GL  Low level language  First closest language to computer  Two states – on, off  Binary code – 0’s & 1’s  No need compiler, interpreter for conversion – faster  Understand the CPU working  Ex. Binary code -01011010
  • 38.
    Assembly Language  AssemblyLanguage is also known as Second Generation Programming Language (2GL).  It is another Low-Level Programming Language and the second closest language to the Computer.  Assembly Language is slower as compared to the Machine Language. However, it is very fast when compared to High-Level Programming Languages (like – C, C++, Java).  Unlike Machine Language, the Assembly Language need a program (called Assembler) to convert its Assembly Code to Machine Code.  Programming in Assembly Language is comparatively much easier as compared to working with Machine Language.  2GL  Low level language  Second closest language to computer  Slower than machine lang.  Faster than high level lang.  Need Assembler for conversion  Working with assembly easy than machine  Ex. MOV, SUB
  • 39.
    Procedural-Oriented Programming • Procedural-OrientedProgramming is also known as Third Generation Programming Language (3GL). • It is one of the primitive and important paradigms in the Programming Industry. • In Procedural-Oriented Programming, instead of focusing on data, we majorly focus on the procedure of the program. • The main goal of Procedural-Oriented Programming is to solve a problem. • So, data is the second priority in Procedural-Oriented Programming, as a result, this Programming Paradigm is comparatively less secure. • In Procedural Oriented Programming, we create a number of statements in order to solve any problem. It uses a Top-Down approach in order to solve any problem. • However, it is very important to maintain the order of every step or statement. Therefore, we make use of functions in Procedural-Oriented Programming. • Procedural-Oriented Programming is a much unrealistic approach to solve a problem as compared to other Programming Paradigm. • Examples of Procedural-Oriented Programming Language: Basic, Fortran, C, Pascal, and COBOL.  3GL  high level language  Focus procedure instead of data  Goal – solve the problem  Less secure  Use Top down approach – solve any pro  Step by step procedure follow  Need compiler for conversion  Working with assembly easy than mach  Ex. Basic, Fortran, C, Pascal, and COBOL.
  • 40.
    Natural Programming Language •Ordinary human language like English • Programming language that use human language to give people a more natural connection with computers. • It is designed to make the computer solve a given problem without the programmer. • It is the part of the field of study known as AI.
  • 41.
    Visual Programming Language •Visual programming language (VPL) is a programming language that uses graphical elements and figures to develop a program rather than textually. • Visual programming language is also known as executable graphics language. • The graphics or icons included within a visual program serve as input, activities, connections and/or output of the program. • UML are popular examples of visual programming languages
  • 42.
    Scripting Language • ScriptingLanguage is the Programing Language which is used for performing automation or repetitive task with the help of scripts. • Unlike, other Programming Languages, Scripting Languages are Run-Time Programming Languages. • Web Automation or Web Scripting is one of the applications of Scripting Language. • You can also automate your daily task on a computer, with the help of Shell Script or Bash Script, which is another most popular example of Scripting Language. • Examples of Scripting Programming Language: Bash, JavaScript, Shell, Python, and Perl.
  • 43.
    HyperText Markup Language •Used to add functionality to a Web page, such as different menu styles or graphic displays or to serve dynamic advertisements. • These types of languages are client-side scripting languages, affecting the data that the end user sees in a browser window. • Other scripting languages are server-side scripting languages that manipulate the data, usually in a database, on the server. • Scripting languages came about largely because of the development of the Internet as a communications tool. JavaScript, ASP, JSP, PHP, Perl, Tcl and Python are examples of scripting languages. • Definition of HTML • HTML (Hypertext Markup Language) is the set of markup symbols or codes inserted in a file intended for display on a World Wide Web browser page. • The markup tells the Web browser how to display a Web page's words and images for the user. • Each individual markup code is referred to as an element (but many people also refer to it as a tag). Some elements come in pairs that indicate when some display effect is to begin and when it is to end. • Example1: • <html> <head> <title>Title of the document</title> </head> <body> The content of the document...... </body> </html>
  • 44.
    Extensible Markup Language(XML) •Definition of XML • Extensible Markup Language (XML) is used to describe data. The XML standard is a flexible way to create information formats and electronically share structured data via the public Internet, as well as via corporate networks. • Difference between HTML and XML • 1. HTML was designed to display data with focus on how data looks while XML was designed to be a software and hardware independent tool used to transport and store data, with focus on what data is. 2. HTML is a markup language itself while XML provides a framework for defining markup languages. 3. HTML is a presentation language while XML is neither a programming language nor a presentation language. 4. HTML is case insensitive while XML is case sensitive. 5. HTML is used for designing a web-page to be rendered on the client side while XML is used basically to transport data between the application and the database. 6. HTML has its own predefined tags while what makes XML flexible is that custom tags can be defined and the tags are invented by the author of the XML document. 7. HTML is not strict if the user does not use the closing tags but XML makes it mandatory for the user the close each tag that has been used. 8. HTML does not preserve white space while XML does.
  • 46.
    Features of GoodProgramming Language • A programming language must be simple, easy to learn and use, have good readability, and be human recognizable. • Abstraction is a must-have Characteristics for a programming language in which the ability to define the complex structure and then its degree of usability comes. • A portable programming language is always preferred. • Programming language’s efficiency must be high so that it can be easily converted into a machine code and executed consumes little space in memory. • A programming language should be well structured and documented so that it is suitable for application development. • Necessary tools for the development, debugging, testing, maintenance of a program must be provided by a programming language. • A programming language should provide a single environment known as Integrated Development Environment(IDE). • A programming language must be consistent in terms of syntax

Editor's Notes

  • #16 Consider a real-life example of encapsulation, in a company, there are different sections like the accounts section, finance section, sales section, etc. The finance section handles all the financial transactions and keeps records of all the data related to finance. Similarly, the sales section handles all the sales-related activities and keeps records of all the sales. Now there may arise a situation when for some reason an official from the finance section needs all the data about sales in a particular month. In this case, he is not allowed to directly access the data of the sales section. He will first have to contact some other officer in the sales section and then request him to give the particular data. This is what encapsulation is. Here the data of the sales section and the employees that can manipulate them are wrapped under a single name “sales section”.
  • #18 Compile-time polymorphism allows us to use many methods with the same name but differing signatures and return types.
  • #30 A translator is a piece of software that handles the translation of source code into a form that can be executed by a processor. 
  • #31 The Assembler is a Software that converts an assembly language code to machine code. It takes basic Computer commands and converts them into Binary Code that Computer's Processor can use to perform its Basic Operations. An assembly language is a low-level language. It gives instructions to the processors for different tasks. It is specific for any processor. The machine language only consists of 0s and 1s therefore, it is difficult to write a program in it. On the other hand, the assembly language is close to a machine language but has a simpler language and cod
  • #37 Adobe ColdFusion is an application server and a platform for building and deploying web and mobile applications. Use ColdFusion to create dynamic internet applications.
  • #40 Top-Down Approach is an approach to design algorithms in which a bigger problem is broken down into smaller parts
  • #43 bash: It is a scripting language to work in the Linux interface. It is a lot easier to use bash to create scripts than other programming languages. It describes the tools to use and code in the command line and create useful reusable scripts and conserve documentation for other people to work with. All scripting languages are programming languages. The scripting language is basically a language where instructions are written for a run time environment.  scripting language is a programming language that is interpreted. It is translated into machine code when the code is run, rather than beforehand.It brings new functions to applications and glue complex system together. A scripting language is a programming language designed for integrating and communicating with other programming languages. Scripting is primarily used to automate tasks for websites and web applications while using an existing program. It is useful for extracting information from a dataset
  • #45 Extensible Markup Language (XML) lets you define and store data in a shareable manner. XML supports information exchange between computer systems such as websites, databases, and third-party applications