SlideShare a Scribd company logo
PROGRAMMING PARADIGM
By
SOUMYA K
Assistant Professor
KristuJayanti College
bangalore
PROGRAMMING PARADIGM--SOUMYA K 1
Course content
1. Types of programming paradigm
2. Structured programming
3. unstructured programming
4. Object oriented programming
5. OOPs concepts
6. Characteristics of programming language
7. Machine programming language
8. Assembly programming language
9. High level programming language
10. Characteristics of a good program
11. Translators and translation hierarchy
12. Software programming languages
13. Web programming languages
PROGRAMMING PARADIGM--SOUMYA K 2
Programming paradigm
 The approach used to develop the program for solving
a problem
 There are 3 types:
 Unstructured , structured and object oriented
programming
PROGRAMMING PARADIGM--SOUMYA K 3
Unstructured programming
 Writing small and simple programs consisting of only
one main program
 All the actions (input,processing,output) are done
within one program
 This is helpful for small application development
 For large programs , it lacks clarity of code, ease of use,
modifiability.
4PROGRAMMING PARADIGM--SOUMYA K
Structured programming
 Following a structured approach
 A program is broken down into small independent
tasks.
 Each task has its own functionality , and performs a
specific part of actual processing
 Each task is developed independently
 After completion of each task ,all task are combined
together to solve the problem
 There are 2 ways
5PROGRAMMING PARADIGM--SOUMYA K
 Procedural programming:
 A single program is divided into small segments called
procedures.(functions ,routines , subroutines)
 From the main, a procedure call is used to invoke the
required procedure.
 After the sequence is processed, the flow of control
transfers to where the call was made.
6PROGRAMMING PARADIGM--SOUMYA K
 Modular programming
 Large programs are broken down into a number of
smaller program units known as modules.
 Each module is performing a specific function
 Each module in itself is a small program, which is
compiled and tested.
 All the modules are combined to build the whole
program
7PROGRAMMING PARADIGM--SOUMYA K
Object oriented programming
 As the name suggests uses objects in programming.
 The main aim of OOP is to bind together the data and the
functions that operates on them
 So no other part of code can access this data except that
function.
 Object
 Classes
 Abstraction
 Encapsulation
 Inheritance
 polymorphism
8PROGRAMMING PARADIGM--SOUMYA K
 Object
 Objects are the basic unit of OOP.
 They are instances of class,
 Any entity that has state and behavior is known as an
object.
 For example, a chair, pen, table, keyboard, bike, etc. It can
be physical or logical.
 An object contains an address and takes up some space in
memory.
 Objects can communicate without knowing the details of
each other's data or code.
 The only necessary thing is the type of message accepted
and the type of response returned by the objects.
 A dog is an object because it has states like color, name,
breed, etc. as well as behaviors like wagging the tail,
barking, eating, etc.
9PROGRAMMING PARADIGM--SOUMYA K
Class
 Collection of objects is called class. It is a logical entity.
 A class can also be defined as a blueprint from which
you can create an individual object. Class doesn't
consume any space.
 It declare & defines what data variables the object will
have and what operations can be performed on the
class's object.
 Class represent all the functions/methods and also the
information a typical object should have.
10PROGRAMMING PARADIGM--SOUMYA K
 Inheritance
 When one object acquires all the properties and
behaviors of a parent object, it is known as inheritance.
 It provides code reusability. It is used to achieve
runtime polymorphism.
Polymorphism
 If one task is performed in different ways, it is known
as polymorphism. For example: to convince the
customer differently, to draw something, for example,
shape, triangle, rectangle, etc.
 Another example can be to speak something; for
example, a cat speaks meow, dog barks woof, etc.
11PROGRAMMING PARADIGM--SOUMYA K
Abstraction
 Hiding internal details and showing functionality is
known as abstraction.
 For example phone call, we don't know the internal
processing.
Encapsulation
 Binding (or wrapping) code and data together into a
single unit are known as encapsulation.
 For example, a capsule, it is wrapped with different
medicines.
12PROGRAMMING PARADIGM--SOUMYA K
 Human Beings are living forms, broadly categorized
into two types, Male and Female.
 Every Human being(Male or Female) has two legs, two
hands, two eyes, one nose, one heart etc
 . There are body parts that are common for Male and
Female,
 but then there are some specific body parts, present in
a Male which are not present in a Female, and some
body parts present in Female but not in Males.
 All Human Beings walk, eat, see, talk, hear etc.
 both Male and Female, performs some common
functions, but there are some specifics to both, which
is not valid for the other.
 For example : A Female can give birth, while a Male
cannot, so this is only for the Female.
13PROGRAMMING PARADIGM--SOUMYA K
 Class
 Here we can take Human Being as a class. A class is a
blueprint for any functional entity which defines its
properties and its functions. Like Human Being,
having body parts, and performing various actions.
 Objects
 My name is soumya, and I am an instance/object of
class Female. We are the objects.
14PROGRAMMING PARADIGM--SOUMYA K
 Inheritance
 Considering HumanBeing a class, which has
properties like hands, legs, eyes etc, and functions like
walk, talk, eat, see etc.
 Male and Female are also classes, but most of the
properties and functions are included in HumanBeing,
 hence they can inherit everything from
class HumanBeing using the concept of Inheritance.
15PROGRAMMING PARADIGM--SOUMYA K
 Abstraction
 Abstraction means, showcasing only the required things to
the outside world while hiding the details.
 Human Being's can talk, walk, hear, eat, but the details are
hidden from the outside world. We can take our skin as the
Abstraction factor in our case, hiding the inside mechanism.
Polymorphism
 Polymorphism is a concept, which allows us to redefine the
way something works, by either changing how it is done or
by changing the parts using which it is done.
Eg: when bell rings…..
16PROGRAMMING PARADIGM--SOUMYA K
 PORTABILITY: platform independent
 READABILITY: clear and logic
 EFFICIENCY: memory and cpu time
 STRUCTURAL : testing and documentation is easier
 FLEXIBILITY: have to makes the changes easily
 GENERALITY: progrm should be general. Progrm should suit for
similar pblms
 DOCUMENTATION:useful to the endusers
CHARACTERISTICS OF A GOOD PROGRAM
17PROGRAMMING PARADIGM--SOUMYA K
Programming languages
 Set of characters, symbols and usage rules that allow
the user to communicate with computers
 Like natural languages are used for communication
among human beings
 Why we are not used natural languages :
1.natural languages are ambiguous, vaguely structured,
large vocabularies
2. We can understand even while using poor grammar
and vocabulary.
18PROGRAMMING PARADIGM--SOUMYA K
Machine languages
 It was used in earliest computers and machines
 Sometimes referred to as machine code or object
code,
 Computer’s native language
 machine language is a collection of binary digits or
bits that the computer reads and interprets.
 Machine language is the only language a computer is
capable of understanding.
 Computers are digital devices, which have only 2 states
 ON and OFF(1 and 0)
 Every instruction is written 1s and 0s.
 Machine lang consists of 2 parts
 Opcode and operand
19PROGRAMMING PARADIGM--SOUMYA K
 Opcode : the operation which tells the computer what
functions are to performed
 Operand: tells to the computer where to find or store
the data on which the desired operation is to be
performed.
 Machine lang is platform dependent
Advantages
I. Translation free : machine lang can directly
understood by computer so no need for conversion
II. High speed: since no conversion is needed. So
programs can be fastly executed.
III. Eg: space control system, nuclear reactors etc
20PROGRAMMING PARADIGM--SOUMYA K
disadvantages
I. Machine dependent: every computer type differs from
each other, based on their architecture. An application
written or one computer may not run on another type of
computer.
II. Complex lang: machine lang is very difficult read and
write
III. It is very difficult to program in machine language. The
programmer has to know details of hardware to write
program.
IV. The programmer has to remember a lot of codes to write
a program which results in program errors.
V. It is difficult to debug the program.
VI. Tedious : it is difficult to modify the program. So the
programmer has to rewrite the program. It is very
tedious and time consuming
21PROGRAMMING PARADIGM--SOUMYA K
Assembly language
 Assembly lang is not a single lang . But a group of
langs.
 It provide a mnemonic instruction, 3 letters long
corresponding to each machine instruction
 Eg : ADD is used for addition
SUB is used for subtraction
• It is machine dependent
• The basic unit of assembly lang program is a line of
code.
• Symbols and set of rules are used and combined to
form asembly lang instruction
• [label] <opcode> <operand> [; comment]
• BEGIN ADD A,B ; ADD B to A
22PROGRAMMING PARADIGM--SOUMYA K
 This is a symbolic representation of machine lang.
 But the program must translate into machine code,
 This I done by separate system program known as
assembler
 Assembler recognizes the machine code of symbolic
instructions.
 Means assembler convert assembly codes into machine
codes and assembles the machine understandable
code into main memory., making it ready for execution
 Original assembly code is known as source code
 Final machine understandable code form is known as
object code
 If we want to modify the program, we should modify
the assembly code then re assemble the object code
23PROGRAMMING PARADIGM--SOUMYA K
Functions of assembler
 It translate the mnemonic operation code into
machine code
 Transfer register address into system address
 It check the syntax of assembly lang program, and
shows the errors
 Assemble all the instructions into memory for
execution
 For a large assembly program, assembler provide
linking facility among subroutines
 It helps the generation of output on the require output
machine
24PROGRAMMING PARADIGM--SOUMYA K
Advantages of assembly lang
 Easy to understand and use
 Less error prone : mnemonics and symbolic address
are used
in case of errors it is easy to locate the errors and
we can make changes easily
• Efficiency: assembly lang program can run much faster
than HLL program and use less memory
• More control on hardware: OS is written in assembly
lang . So it is easy to access machine features /
hardwares .
25PROGRAMMING PARADIGM--SOUMYA K
disadvantage
 Machine dependent :
 Harder to learn : because assembly lang is machine
dependent, we need to know the underlying machine
architecture.
 Slow development time: compared to HLL it takes
more time for development
 Less efficient: compared to machine lang , it is less
efficient . We have to transfer Assembly instructions
into machine
 No standardization : each type of computer has
different instruction set, so different assembly lang
 No support for modern software engineering
technology: no OOPS support, no support for
distributed systems.
26PROGRAMMING PARADIGM--SOUMYA K
High level lang
 Assembly lang demanded programming and hardware
skill to use the computers.
 So programmers invented the HLL
 Eg: COBOL , C etc
 Similar english lang
 Programs are written using this lang can be machine
independent
 A single HLL statement consist of many lines of
instruction in machine and assembly langs
 HLL program can use with other system without or
with minimal modification
 Avoids re-writing of the same program in different
computers
27PROGRAMMING PARADIGM--SOUMYA K
 In HLL , programs are written in a sequence of
statemnet to solve a problem
 Eg: LET X=10;
LET Y=20;
LET SUM=X+Y;
PRINT SUM
This is a BASIC code
28PROGRAMMING PARADIGM--SOUMYA K
Translating HLL to Machine lang
 Computers understand machine lang , it is necessary
to convert HLL into machine lang.
 This is achieved by lang translators or lang
processors that are known as compilers or
interpreters
Compiler
 It is a program which translate source code written
in programming lang into machine understandable
format.
 Each HLL there is a separate compiler required.
 Compiler replace a singe programming lang into
series of machine intructions.
29PROGRAMMING PARADIGM--SOUMYA K
 During translation process, the compiler reads the
source program and check the syntax.
 If there any error , compiler generate error message.
 Compiler will not create object code until all the errors
are rectified
INTERPRETER
 Interpreter translate statement in a program and
execute the statement immediately
 Statement by statement they are translating and
executing
 When an error encountered in the program , execution
of the program halted
 That error message is displayed
30PROGRAMMING PARADIGM--SOUMYA K
Linker
 When a program is broken into several modules , each
module can be modified and compiled independently
 These modules have to be linked together to create a
complete application
 This is done by linker
 A linker is a program that links several object modules
and libraries to form a single executable file.
LOADER
• Part of OS
• Loader bring executable file from disk to memory and
starts execution.
• It is responsible for loading, linking and relocation
31PROGRAMMING PARADIGM--SOUMYA K
 Functions of loader
 1. allocation : it allocates memory space for program
 2.linking: it combines two or more object program and give
information about references.
 3. relocation : it prepares a program to execute properly
from its storage area.
 4.loading: it places data and machine instruction into
memory
 There are 2 type of loaders.
Absolute loader
 The absolute loader is the simplest and quickest of the two.
 The loader loads the file into memory at the location
specified by the beginning portion (header) of the file,
then passes control to the program.
 If the memory space specified by the header is currently in
use, execution cannot proceed, and the user must wait
until the requested memory becomes free.
32PROGRAMMING PARADIGM--SOUMYA K
Relocating loader
 The relocating loader will load the program anywhere
in memory, altering the various addresses as required
to ensure correct referencing.
 The decision as to where in memory the program is
placed is done by the Operating System, not the
programs header file.
 This is obviously more efficient, but introduces a slight
overhead in terms of a small delay whilst all the
relative offsets are calculated.
 The relocating loader can only relocate code that has
been produced by a linker
33PROGRAMMING PARADIGM--SOUMYA K
Advantages of HLL
 High level languages are programmer friendly. They
are easy to write, debug and maintain.
 It provide higher level of abstraction from machine
languages.
 It is machine independent language.
 Easy to learn.
 Less error prone, easy to find and debug errors.
 High level programming results in better
programming productivity.
34PROGRAMMING PARADIGM--SOUMYA K
Disadvantages of HLL
 It takes additional translation times to translate the
source to machine code.
 High level programs are comparatively slower than low
level programs.
 Compared to low level programs, they are generally
less memory efficient.
 Cannot communicate directly with the hardware.
35PROGRAMMING PARADIGM--SOUMYA K
Characteristics of a good programming lang
 Simplicity : A good programming language must be simple and easy to
learn and use. It should provide a programmer with a clear, simple and
unified set of concepts, which can be easily grasped. The overall
simplicity of a programming language strongly affects the readability of
the programs written in that language, and programs, which are easier
to read and understand, are also easier to maintain. It is also easy to
develop and implement a compiler or an interpreter for a programming
language, which is simple. However, the power needed for the language
should not be sacrificed for simplicity.
 Naturalness:- A good language should be natural for the application
area, for which it has been designed. That is, it should provide
appropriate operators, data structures, control structures, and a natural
syntax to facilitate the users to code their problem easily and efficiently.
 Abstraction:- Abstraction means the ability to define and then use
complicated structures or operations in ways that allow many of the
details to be ignored. The degree of abstraction allowed by a
programming language directly effects its writ ability. Object oriented
language support high degree of abstraction. Hence, writing programs
in object oriented language is much easier. Object oriented language
also support re usability of program segments due to this features.
36PROGRAMMING PARADIGM--SOUMYA K
 Efficiency :- Programs written in a good programming language
are efficiently translated into machine code, are efficiently
executed, and acquire as little space in the memory as possible.
That is a good programming language is supported with a good
language translator which gives due consideration to space and
time efficiency.
 Structured:- Structured means that the language should have
necessary features to allow its users to write their programs
based on the concepts of structured programming. This property
of a moreover, it forces a programmer to look at a problem in a
logical way, so that fewer errors are created while writing a
program for the problem.
 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.
 Locality :- A good programming language should be such that
while writing a programmer concentrate almost solely on the
part of the program around the statement currently being
worked with
37PROGRAMMING PARADIGM--SOUMYA K
 Used for creating executable programs. We can create
anything from simple console programs that print some text
to the screen to entire operating systems. Vary greatly in
terms of power and complexity.
 C
An advanced programming language used for software
application development. Originally developed by Dennis
Ritchie at Bell Labs in the 1970's and designed to be a systems
programming language but since then has proven itself to be
able to be used for various software applications such as
business programs, engineering programs, and even games.
The UNIX operating system is written in C.
 C++
Descendant of the C language. The difference between the two
languages is that C++ is object-oriented. C++ was developed
by BjarneStroustrup at Bell Labs and is a very popular
language for graphical applications.
SOFTWARE LANGUAGES
38PROGRAMMING PARADIGM--SOUMYA K
 Visual Basic
A language developed by Microsoft based on the
BASIC language . Visual Basic is used for creating
Windows applications. The VBScript language
(also developed by Microsoft) is based on Visual
Basic.
 Java
A powerful and flexible language created by Sun
MicroSystems that can be used to create applets (a
program that is executed from within another
program) that run inside webpages as well as
software applications.
39PROGRAMMING PARADIGM--SOUMYA K
Visual programming language :
 Visual programming language (VPL) is a programming language
that uses graphical elements and figures to develop a program.
 VPL employs techniques to design a software program in two or
more dimensions, and includes graphical elements, text,
symbols and icons within its programming context.
 Visual programming language is also known as executable
graphics language.
 Visual programming language enables the development of
software programs by eliminating textual software code with a
series of visual graphics elements.
 VPL incorporates these graphical elements as the primary
context of the language arranged in a systematic order.
40PROGRAMMING PARADIGM--SOUMYA K
 Visual language has a few types, such as icon-based
languages, diagramming languages and form-based
language.
 Visual languages should not be confused with GUI-
based programming language as they only provide
graphical program authoring services. However, their
code/context is completely textual.
41PROGRAMMING PARADIGM--SOUMYA K
Program Translation
 A translator is a computer program that performs the
translation of a program
 Program written in a given programming language into a
functionally equivalent program in a different computer
language.
 without losing the functional or logical structure of the
original code.

42PROGRAMMING PARADIGM--SOUMYA K
43PROGRAMMING PARADIGM--SOUMYA K
 • Compiler
 Translates high level language program into assembly language.
 •Assembler
 Converts assembly language programs into Object files
 Object files contain a combination of machine instructions, data, and
information needed to place instructions properly in memory
 Assemblers
 • Assemblers need to
 – translate assembly instructions and pseudo-instructions into
machine instructions
 – Convert decimal numbers, etc. specified by programmer into
binary.

 • Typically, assemblers make two passes over the assembly file
 – First pass: reads each line and records labels in a symbol table
 – Second pass: use info in symbol table to produce actual
 Machine code for each line.

44PROGRAMMING PARADIGM--SOUMYA K
 Linker
 • Tool that merges the object files produced by separate
compilation or assembly and creates an executable file
 • Three tasks
 – Searches the program to find library routines used by
program, e.g. printf(), math routines,…
 – Determines the memory locations that code from each
module will occupy and relocates its instructions by adjusting
absolute references
 – Resolves references among files.
45PROGRAMMING PARADIGM--SOUMYA K
 Loader
 • Part of the OS that brings an executable file residing on
disk into memory and starts it running
 • Steps
 – Read executable file’s header to determine the size of
text and data segments
 – Create a new address space for the program
 – Copies instructions and data into address space
 – Copies arguments passed to the program on the stack
 – Initializes the machine registers including the stack ptr
 – Jumps to a startup routine that copies the program’s
arguments from the stack to registers and calls the
program’s main routine.
46PROGRAMMING PARADIGM--SOUMYA K
 Scripting languages:
 Scripting languages, which can be embedded within
HTML, commonly are 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 and Python are
examples of scripting languages.
47PROGRAMMING PARADIGM--SOUMYA K
48PROGRAMMING PARADIGM--SOUMYA K
49PROGRAMMING PARADIGM--SOUMYA K
 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.
50PROGRAMMING PARADIGM--SOUMYA K
 Example1:
 <html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
51PROGRAMMING PARADIGM--SOUMYA K
 Example2:
 <html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
<p> hai alll …. How are you </p>
</body>
</html>
52PROGRAMMING PARADIGM--SOUMYA K
 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.
53PROGRAMMING PARADIGM--SOUMYA K
 <?xml version="1.0" standalone="yes"?>
 <conversation>
 <greeting>Hello, world!</greeting>
 <response>Stop the planet, I want to get
off!</response>
 </conversation>
54PROGRAMMING PARADIGM--SOUMYA K
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.
55PROGRAMMING PARADIGM--SOUMYA K
 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 itsown 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.
9. HTML is about displaying data, hence static but XML
is about carrying information, hence dynamic.
56PROGRAMMING PARADIGM--SOUMYA K
PROGRAMMING LANGUAGE
 A programming language is a set of commands,
instructions, and other syntax use to create a software
program.
 By using this program a user can communicate with the
digital machine
 We can control and co-ordinate the hardware components
of the system.
 Programming languages can be used to create programs to
control the behavior of a machine
 a programming language has two components : syntax
(form) and semantics (meaning).
57PROGRAMMING PARADIGM--SOUMYA K
The different types of languages
 Not any computer programming language can do
anything.
 There are limitations, and actually, different languages
are used for different tasks
 1 . WEB LANGUAGES
 2. SOFTWARE LANGUAGES
58PROGRAMMING PARADIGM--SOUMYA K
WEB LANGUAGES
 Used for creating and editing pages on the web.
 Can do anything from putting plain text on a webpage, to
accessing and retrieving data from a database.
 Web programming refers to the writing, markup and
coding involved in Web development, which includes Web
content, Web client and server scripting and network
security.
 The most common languages used for Web programming
are HTML, JavaScript, Perl 5 and PHP.
 Web programming is different from just programming,
which requires interdisciplinary knowledge on the
application area, client and server scripting, and database
technology.
59PROGRAMMING PARADIGM--SOUMYA K
 1. JavaScript
 most popular and dynamic programming languages
used for creating and developing websites.
 This language is capable of achieving several things
including controlling the browser, editing content on a
document that has been displayed, allowing client-
side scripts to communicate with users.
 It was developed by Netscape and borrows a lot of its
syntax from C language.
 JavaScript is used very widely and effectively in
creating desktop applications as well as for developing
games.
60PROGRAMMING PARADIGM--SOUMYA K
main features of JavaScript programming language
 Structured – JavaScript is a highly structured language
with a proper and planned syntax that has been derived
from C. It differentiates between statements and
expressions
 Dynamic – The types in JavaScript are not related with
variables but with values. This is a dynamic programming
language that enables you to test the type of an object in
many different ways. Also, this programming language is
object-oriented where all the objects are associative arrays.
 Functional – All functions in JavaScript are objects and are
all first-class. They are associated with their own functions
as well as characteristics. For example, a function within a
function is called a nested function whereas this language
also supports anonymous function.
61PROGRAMMING PARADIGM--SOUMYA K
PHP
 define PHP Hypertext Processor language that is a free
server-side scripting language
 It has been designed for not just web development but
also as a general-purpose programming platform.
 websites powered by this platform include Facebook,
WordPress
 PHP is an open source language and fast prototyping
language.
 This language is compatible with UNIX based OS as
well as Windows OS.
 Some industries where PHP is mostly used include
startup businesses, advertising apps, and small
software organizations as well as media agencies.
 The language can be embedded in HTML directly.
62PROGRAMMING PARADIGM--SOUMYA K
Features of php
 Simple
 Platform independent
 Open source
 Case insensitive
 Interpreted
 Loosely typed: support variable usage with out
declaring its data type
63PROGRAMMING PARADIGM--SOUMYA K
 Java
 Java is yet another highly popular and widely used
language that you can consider for web development.
 This language is an object-oriented, class-based and
concurrent language that was developed by Sun
Microsystems
 It is a secure and robust programming language
 It is object-oriented, simple language
 It is capable of being implemented and executed with
high performance.
 It is threaded, dynamic and interpreted.
 It is portable and architecture-neutral.
64PROGRAMMING PARADIGM--SOUMYA K
 Xml
 XML is designed to describe data but is not concerned
with the data’s visualization.
 The tags created in XML are self explanatory and the
user is free to define their own tags — hence the
“extensible.”
 Simplicity, portability, platform independence, and
usability are some of the key features
 allowing users to create custom defined tags according
to XML Document Type Definition (DTD) standards.
65PROGRAMMING PARADIGM--SOUMYA K
 VBScript
 A language developed by Microsoft that works only in Microsoft's
Internet Explorer web browser and web browsers based on the
Internet Explorer engine
 VBScript Can be used to print dates, make calculations, interact with
the user, and more
 Features of VBScript
 VBScript is a lightweight scripting language, which has a lightning
fast interpreter.
 VBScript, for the most part, is case insensitive. It has a very simple
syntax, easy to learn and to implement.
 Unlike C++ or Java, VBScript is an object-based scripting language
and NOT an Object-Oriented Programming language.
 It uses Component Object Model (COM) in order to access the
elements of the environment in which it is executing.
 Successful execution of VBScript can happen only if it is executed in
Host Environment such as Internet Explorer (IE), Internet
Information Services (IIS) and Windows Scripting Host (WSH)
66PROGRAMMING PARADIGM--SOUMYA K
SOFTWARE LANGUAGES
 Used for creating executable programs.
 We can create anything from simple console programs that
print some text to the screen to entire operating systems.
 Vary greatly in terms of power and complexity.
 1. C programming lang
An advanced programming language used for software
application development.
 Originally developed by Dennis Ritchie at Bell Labs in the
1970's
 designed to be a systems programming language but since then
has proven itself to be able to be used for various software
applications such as business programs, engineering programs,
and even games.
 The UNIX operating system is written in C.
67PROGRAMMING PARADIGM--SOUMYA K
 C++
Descendant of the C language.
 The difference between the two languages is that C++ is
object-oriented.
 C++ was developed by Bjarne Stroustrup at Bell Labs
 it is a very popular language for graphical applications.
 Features of C++
 C++ is fast
This offers a huge boost in speed that high level languages like
Python, Java don’t give you.
 C++ is a multi-paradigm programming language
C++ supports at least 7 different styles of programming and
gives developers the freedom to choose one at their will.
 Object oriented programming with C++
Object oriented programming helps you solve a complex
problem intuitively.
68PROGRAMMING PARADIGM--SOUMYA K
 Java
A powerful and flexible language created by Sun
MicroSystems that can be used to create applets (a program
that is executed from within another program) that run inside
webpages as well as software applications.
 Features of Java Programming Language
 Java is platform independent
An object-oriented Language
Java is fast
Java is secure
 Large Standard Library
69PROGRAMMING PARADIGM--SOUMYA K

More Related Content

Similar to Programming paradigm

Bluej
BluejBluej
PCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxPCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptx
vishnupriyapm4
 
Cs8392 u1-1-oop intro
Cs8392 u1-1-oop introCs8392 u1-1-oop intro
Cs8392 u1-1-oop intro
Rajasekaran S
 
Java seminar
Java seminarJava seminar
Java seminar
Santoshsingh616
 
Programming Part 01
Programming Part 01Programming Part 01
Programming Part 01
zakri zakaria
 
Unit 1
Unit 1Unit 1
Unit 1
ankita1317
 
JAVA
JAVAJAVA
La5 ict-topic-5-programming
La5 ict-topic-5-programmingLa5 ict-topic-5-programming
La5 ict-topic-5-programmingAzmiah Mahmud
 
Ict topic 5
Ict topic 5Ict topic 5
Ict topic 5
kwongliik
 
Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]
RAVIPUROHIT22
 
Sulthan's_JAVA_Material_for_B.Sc-CS.pdf
Sulthan's_JAVA_Material_for_B.Sc-CS.pdfSulthan's_JAVA_Material_for_B.Sc-CS.pdf
Sulthan's_JAVA_Material_for_B.Sc-CS.pdf
SULTHAN BASHA
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
meisaina
 
1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptx1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptx
Kabiles07
 
PROGRAMMING LANGUAGE AND TYPES
PROGRAMMING LANGUAGE AND TYPESPROGRAMMING LANGUAGE AND TYPES
PROGRAMMING LANGUAGE AND TYPES
DrThenmozhiKarunanit
 
Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - Introduction
Madishetty Prathibha
 

Similar to Programming paradigm (20)

Bluej
BluejBluej
Bluej
 
PCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxPCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptx
 
Cs8392 u1-1-oop intro
Cs8392 u1-1-oop introCs8392 u1-1-oop intro
Cs8392 u1-1-oop intro
 
Java seminar
Java seminarJava seminar
Java seminar
 
Notacd071
Notacd071Notacd071
Notacd071
 
Programming Part 01
Programming Part 01Programming Part 01
Programming Part 01
 
Unit 1
Unit 1Unit 1
Unit 1
 
JAVA
JAVAJAVA
JAVA
 
Notacd07
Notacd07Notacd07
Notacd07
 
Nota programming
Nota programmingNota programming
Nota programming
 
La5 ict-topic-5-programming
La5 ict-topic-5-programmingLa5 ict-topic-5-programming
La5 ict-topic-5-programming
 
Ict topic 5
Ict topic 5Ict topic 5
Ict topic 5
 
Lec 1 25_jul13
Lec 1 25_jul13Lec 1 25_jul13
Lec 1 25_jul13
 
Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]
 
La5 programming
La5  programmingLa5  programming
La5 programming
 
Sulthan's_JAVA_Material_for_B.Sc-CS.pdf
Sulthan's_JAVA_Material_for_B.Sc-CS.pdfSulthan's_JAVA_Material_for_B.Sc-CS.pdf
Sulthan's_JAVA_Material_for_B.Sc-CS.pdf
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptx1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptx
 
PROGRAMMING LANGUAGE AND TYPES
PROGRAMMING LANGUAGE AND TYPESPROGRAMMING LANGUAGE AND TYPES
PROGRAMMING LANGUAGE AND TYPES
 
Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - Introduction
 

Recently uploaded

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

Programming paradigm

  • 1. PROGRAMMING PARADIGM By SOUMYA K Assistant Professor KristuJayanti College bangalore PROGRAMMING PARADIGM--SOUMYA K 1
  • 2. Course content 1. Types of programming paradigm 2. Structured programming 3. unstructured programming 4. Object oriented programming 5. OOPs concepts 6. Characteristics of programming language 7. Machine programming language 8. Assembly programming language 9. High level programming language 10. Characteristics of a good program 11. Translators and translation hierarchy 12. Software programming languages 13. Web programming languages PROGRAMMING PARADIGM--SOUMYA K 2
  • 3. Programming paradigm  The approach used to develop the program for solving a problem  There are 3 types:  Unstructured , structured and object oriented programming PROGRAMMING PARADIGM--SOUMYA K 3
  • 4. Unstructured programming  Writing small and simple programs consisting of only one main program  All the actions (input,processing,output) are done within one program  This is helpful for small application development  For large programs , it lacks clarity of code, ease of use, modifiability. 4PROGRAMMING PARADIGM--SOUMYA K
  • 5. Structured programming  Following a structured approach  A program is broken down into small independent tasks.  Each task has its own functionality , and performs a specific part of actual processing  Each task is developed independently  After completion of each task ,all task are combined together to solve the problem  There are 2 ways 5PROGRAMMING PARADIGM--SOUMYA K
  • 6.  Procedural programming:  A single program is divided into small segments called procedures.(functions ,routines , subroutines)  From the main, a procedure call is used to invoke the required procedure.  After the sequence is processed, the flow of control transfers to where the call was made. 6PROGRAMMING PARADIGM--SOUMYA K
  • 7.  Modular programming  Large programs are broken down into a number of smaller program units known as modules.  Each module is performing a specific function  Each module in itself is a small program, which is compiled and tested.  All the modules are combined to build the whole program 7PROGRAMMING PARADIGM--SOUMYA K
  • 8. Object oriented programming  As the name suggests uses objects in programming.  The main aim of OOP is to bind together the data and the functions that operates on them  So no other part of code can access this data except that function.  Object  Classes  Abstraction  Encapsulation  Inheritance  polymorphism 8PROGRAMMING PARADIGM--SOUMYA K
  • 9.  Object  Objects are the basic unit of OOP.  They are instances of class,  Any entity that has state and behavior is known as an object.  For example, a chair, pen, table, keyboard, bike, etc. It can be physical or logical.  An object contains an address and takes up some space in memory.  Objects can communicate without knowing the details of each other's data or code.  The only necessary thing is the type of message accepted and the type of response returned by the objects.  A dog is an object because it has states like color, name, breed, etc. as well as behaviors like wagging the tail, barking, eating, etc. 9PROGRAMMING PARADIGM--SOUMYA K
  • 10. Class  Collection of objects is called class. It is a logical entity.  A class can also be defined as a blueprint from which you can create an individual object. Class doesn't consume any space.  It declare & defines what data variables the object will have and what operations can be performed on the class's object.  Class represent all the functions/methods and also the information a typical object should have. 10PROGRAMMING PARADIGM--SOUMYA K
  • 11.  Inheritance  When one object acquires all the properties and behaviors of a parent object, it is known as inheritance.  It provides code reusability. It is used to achieve runtime polymorphism. Polymorphism  If one task is performed in different ways, it is known as polymorphism. For example: to convince the customer differently, to draw something, for example, shape, triangle, rectangle, etc.  Another example can be to speak something; for example, a cat speaks meow, dog barks woof, etc. 11PROGRAMMING PARADIGM--SOUMYA K
  • 12. Abstraction  Hiding internal details and showing functionality is known as abstraction.  For example phone call, we don't know the internal processing. Encapsulation  Binding (or wrapping) code and data together into a single unit are known as encapsulation.  For example, a capsule, it is wrapped with different medicines. 12PROGRAMMING PARADIGM--SOUMYA K
  • 13.  Human Beings are living forms, broadly categorized into two types, Male and Female.  Every Human being(Male or Female) has two legs, two hands, two eyes, one nose, one heart etc  . There are body parts that are common for Male and Female,  but then there are some specific body parts, present in a Male which are not present in a Female, and some body parts present in Female but not in Males.  All Human Beings walk, eat, see, talk, hear etc.  both Male and Female, performs some common functions, but there are some specifics to both, which is not valid for the other.  For example : A Female can give birth, while a Male cannot, so this is only for the Female. 13PROGRAMMING PARADIGM--SOUMYA K
  • 14.  Class  Here we can take Human Being as a class. A class is a blueprint for any functional entity which defines its properties and its functions. Like Human Being, having body parts, and performing various actions.  Objects  My name is soumya, and I am an instance/object of class Female. We are the objects. 14PROGRAMMING PARADIGM--SOUMYA K
  • 15.  Inheritance  Considering HumanBeing a class, which has properties like hands, legs, eyes etc, and functions like walk, talk, eat, see etc.  Male and Female are also classes, but most of the properties and functions are included in HumanBeing,  hence they can inherit everything from class HumanBeing using the concept of Inheritance. 15PROGRAMMING PARADIGM--SOUMYA K
  • 16.  Abstraction  Abstraction means, showcasing only the required things to the outside world while hiding the details.  Human Being's can talk, walk, hear, eat, but the details are hidden from the outside world. We can take our skin as the Abstraction factor in our case, hiding the inside mechanism. Polymorphism  Polymorphism is a concept, which allows us to redefine the way something works, by either changing how it is done or by changing the parts using which it is done. Eg: when bell rings….. 16PROGRAMMING PARADIGM--SOUMYA K
  • 17.  PORTABILITY: platform independent  READABILITY: clear and logic  EFFICIENCY: memory and cpu time  STRUCTURAL : testing and documentation is easier  FLEXIBILITY: have to makes the changes easily  GENERALITY: progrm should be general. Progrm should suit for similar pblms  DOCUMENTATION:useful to the endusers CHARACTERISTICS OF A GOOD PROGRAM 17PROGRAMMING PARADIGM--SOUMYA K
  • 18. Programming languages  Set of characters, symbols and usage rules that allow the user to communicate with computers  Like natural languages are used for communication among human beings  Why we are not used natural languages : 1.natural languages are ambiguous, vaguely structured, large vocabularies 2. We can understand even while using poor grammar and vocabulary. 18PROGRAMMING PARADIGM--SOUMYA K
  • 19. Machine languages  It was used in earliest computers and machines  Sometimes referred to as machine code or object code,  Computer’s native language  machine language is a collection of binary digits or bits that the computer reads and interprets.  Machine language is the only language a computer is capable of understanding.  Computers are digital devices, which have only 2 states  ON and OFF(1 and 0)  Every instruction is written 1s and 0s.  Machine lang consists of 2 parts  Opcode and operand 19PROGRAMMING PARADIGM--SOUMYA K
  • 20.  Opcode : the operation which tells the computer what functions are to performed  Operand: tells to the computer where to find or store the data on which the desired operation is to be performed.  Machine lang is platform dependent Advantages I. Translation free : machine lang can directly understood by computer so no need for conversion II. High speed: since no conversion is needed. So programs can be fastly executed. III. Eg: space control system, nuclear reactors etc 20PROGRAMMING PARADIGM--SOUMYA K
  • 21. disadvantages I. Machine dependent: every computer type differs from each other, based on their architecture. An application written or one computer may not run on another type of computer. II. Complex lang: machine lang is very difficult read and write III. It is very difficult to program in machine language. The programmer has to know details of hardware to write program. IV. The programmer has to remember a lot of codes to write a program which results in program errors. V. It is difficult to debug the program. VI. Tedious : it is difficult to modify the program. So the programmer has to rewrite the program. It is very tedious and time consuming 21PROGRAMMING PARADIGM--SOUMYA K
  • 22. Assembly language  Assembly lang is not a single lang . But a group of langs.  It provide a mnemonic instruction, 3 letters long corresponding to each machine instruction  Eg : ADD is used for addition SUB is used for subtraction • It is machine dependent • The basic unit of assembly lang program is a line of code. • Symbols and set of rules are used and combined to form asembly lang instruction • [label] <opcode> <operand> [; comment] • BEGIN ADD A,B ; ADD B to A 22PROGRAMMING PARADIGM--SOUMYA K
  • 23.  This is a symbolic representation of machine lang.  But the program must translate into machine code,  This I done by separate system program known as assembler  Assembler recognizes the machine code of symbolic instructions.  Means assembler convert assembly codes into machine codes and assembles the machine understandable code into main memory., making it ready for execution  Original assembly code is known as source code  Final machine understandable code form is known as object code  If we want to modify the program, we should modify the assembly code then re assemble the object code 23PROGRAMMING PARADIGM--SOUMYA K
  • 24. Functions of assembler  It translate the mnemonic operation code into machine code  Transfer register address into system address  It check the syntax of assembly lang program, and shows the errors  Assemble all the instructions into memory for execution  For a large assembly program, assembler provide linking facility among subroutines  It helps the generation of output on the require output machine 24PROGRAMMING PARADIGM--SOUMYA K
  • 25. Advantages of assembly lang  Easy to understand and use  Less error prone : mnemonics and symbolic address are used in case of errors it is easy to locate the errors and we can make changes easily • Efficiency: assembly lang program can run much faster than HLL program and use less memory • More control on hardware: OS is written in assembly lang . So it is easy to access machine features / hardwares . 25PROGRAMMING PARADIGM--SOUMYA K
  • 26. disadvantage  Machine dependent :  Harder to learn : because assembly lang is machine dependent, we need to know the underlying machine architecture.  Slow development time: compared to HLL it takes more time for development  Less efficient: compared to machine lang , it is less efficient . We have to transfer Assembly instructions into machine  No standardization : each type of computer has different instruction set, so different assembly lang  No support for modern software engineering technology: no OOPS support, no support for distributed systems. 26PROGRAMMING PARADIGM--SOUMYA K
  • 27. High level lang  Assembly lang demanded programming and hardware skill to use the computers.  So programmers invented the HLL  Eg: COBOL , C etc  Similar english lang  Programs are written using this lang can be machine independent  A single HLL statement consist of many lines of instruction in machine and assembly langs  HLL program can use with other system without or with minimal modification  Avoids re-writing of the same program in different computers 27PROGRAMMING PARADIGM--SOUMYA K
  • 28.  In HLL , programs are written in a sequence of statemnet to solve a problem  Eg: LET X=10; LET Y=20; LET SUM=X+Y; PRINT SUM This is a BASIC code 28PROGRAMMING PARADIGM--SOUMYA K
  • 29. Translating HLL to Machine lang  Computers understand machine lang , it is necessary to convert HLL into machine lang.  This is achieved by lang translators or lang processors that are known as compilers or interpreters Compiler  It is a program which translate source code written in programming lang into machine understandable format.  Each HLL there is a separate compiler required.  Compiler replace a singe programming lang into series of machine intructions. 29PROGRAMMING PARADIGM--SOUMYA K
  • 30.  During translation process, the compiler reads the source program and check the syntax.  If there any error , compiler generate error message.  Compiler will not create object code until all the errors are rectified INTERPRETER  Interpreter translate statement in a program and execute the statement immediately  Statement by statement they are translating and executing  When an error encountered in the program , execution of the program halted  That error message is displayed 30PROGRAMMING PARADIGM--SOUMYA K
  • 31. Linker  When a program is broken into several modules , each module can be modified and compiled independently  These modules have to be linked together to create a complete application  This is done by linker  A linker is a program that links several object modules and libraries to form a single executable file. LOADER • Part of OS • Loader bring executable file from disk to memory and starts execution. • It is responsible for loading, linking and relocation 31PROGRAMMING PARADIGM--SOUMYA K
  • 32.  Functions of loader  1. allocation : it allocates memory space for program  2.linking: it combines two or more object program and give information about references.  3. relocation : it prepares a program to execute properly from its storage area.  4.loading: it places data and machine instruction into memory  There are 2 type of loaders. Absolute loader  The absolute loader is the simplest and quickest of the two.  The loader loads the file into memory at the location specified by the beginning portion (header) of the file, then passes control to the program.  If the memory space specified by the header is currently in use, execution cannot proceed, and the user must wait until the requested memory becomes free. 32PROGRAMMING PARADIGM--SOUMYA K
  • 33. Relocating loader  The relocating loader will load the program anywhere in memory, altering the various addresses as required to ensure correct referencing.  The decision as to where in memory the program is placed is done by the Operating System, not the programs header file.  This is obviously more efficient, but introduces a slight overhead in terms of a small delay whilst all the relative offsets are calculated.  The relocating loader can only relocate code that has been produced by a linker 33PROGRAMMING PARADIGM--SOUMYA K
  • 34. Advantages of HLL  High level languages are programmer friendly. They are easy to write, debug and maintain.  It provide higher level of abstraction from machine languages.  It is machine independent language.  Easy to learn.  Less error prone, easy to find and debug errors.  High level programming results in better programming productivity. 34PROGRAMMING PARADIGM--SOUMYA K
  • 35. Disadvantages of HLL  It takes additional translation times to translate the source to machine code.  High level programs are comparatively slower than low level programs.  Compared to low level programs, they are generally less memory efficient.  Cannot communicate directly with the hardware. 35PROGRAMMING PARADIGM--SOUMYA K
  • 36. Characteristics of a good programming lang  Simplicity : A good programming language must be simple and easy to learn and use. It should provide a programmer with a clear, simple and unified set of concepts, which can be easily grasped. The overall simplicity of a programming language strongly affects the readability of the programs written in that language, and programs, which are easier to read and understand, are also easier to maintain. It is also easy to develop and implement a compiler or an interpreter for a programming language, which is simple. However, the power needed for the language should not be sacrificed for simplicity.  Naturalness:- A good language should be natural for the application area, for which it has been designed. That is, it should provide appropriate operators, data structures, control structures, and a natural syntax to facilitate the users to code their problem easily and efficiently.  Abstraction:- Abstraction means the ability to define and then use complicated structures or operations in ways that allow many of the details to be ignored. The degree of abstraction allowed by a programming language directly effects its writ ability. Object oriented language support high degree of abstraction. Hence, writing programs in object oriented language is much easier. Object oriented language also support re usability of program segments due to this features. 36PROGRAMMING PARADIGM--SOUMYA K
  • 37.  Efficiency :- Programs written in a good programming language are efficiently translated into machine code, are efficiently executed, and acquire as little space in the memory as possible. That is a good programming language is supported with a good language translator which gives due consideration to space and time efficiency.  Structured:- Structured means that the language should have necessary features to allow its users to write their programs based on the concepts of structured programming. This property of a moreover, it forces a programmer to look at a problem in a logical way, so that fewer errors are created while writing a program for the problem.  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.  Locality :- A good programming language should be such that while writing a programmer concentrate almost solely on the part of the program around the statement currently being worked with 37PROGRAMMING PARADIGM--SOUMYA K
  • 38.  Used for creating executable programs. We can create anything from simple console programs that print some text to the screen to entire operating systems. Vary greatly in terms of power and complexity.  C An advanced programming language used for software application development. Originally developed by Dennis Ritchie at Bell Labs in the 1970's and designed to be a systems programming language but since then has proven itself to be able to be used for various software applications such as business programs, engineering programs, and even games. The UNIX operating system is written in C.  C++ Descendant of the C language. The difference between the two languages is that C++ is object-oriented. C++ was developed by BjarneStroustrup at Bell Labs and is a very popular language for graphical applications. SOFTWARE LANGUAGES 38PROGRAMMING PARADIGM--SOUMYA K
  • 39.  Visual Basic A language developed by Microsoft based on the BASIC language . Visual Basic is used for creating Windows applications. The VBScript language (also developed by Microsoft) is based on Visual Basic.  Java A powerful and flexible language created by Sun MicroSystems that can be used to create applets (a program that is executed from within another program) that run inside webpages as well as software applications. 39PROGRAMMING PARADIGM--SOUMYA K
  • 40. Visual programming language :  Visual programming language (VPL) is a programming language that uses graphical elements and figures to develop a program.  VPL employs techniques to design a software program in two or more dimensions, and includes graphical elements, text, symbols and icons within its programming context.  Visual programming language is also known as executable graphics language.  Visual programming language enables the development of software programs by eliminating textual software code with a series of visual graphics elements.  VPL incorporates these graphical elements as the primary context of the language arranged in a systematic order. 40PROGRAMMING PARADIGM--SOUMYA K
  • 41.  Visual language has a few types, such as icon-based languages, diagramming languages and form-based language.  Visual languages should not be confused with GUI- based programming language as they only provide graphical program authoring services. However, their code/context is completely textual. 41PROGRAMMING PARADIGM--SOUMYA K
  • 42. Program Translation  A translator is a computer program that performs the translation of a program  Program written in a given programming language into a functionally equivalent program in a different computer language.  without losing the functional or logical structure of the original code.  42PROGRAMMING PARADIGM--SOUMYA K
  • 44.  • Compiler  Translates high level language program into assembly language.  •Assembler  Converts assembly language programs into Object files  Object files contain a combination of machine instructions, data, and information needed to place instructions properly in memory  Assemblers  • Assemblers need to  – translate assembly instructions and pseudo-instructions into machine instructions  – Convert decimal numbers, etc. specified by programmer into binary.   • Typically, assemblers make two passes over the assembly file  – First pass: reads each line and records labels in a symbol table  – Second pass: use info in symbol table to produce actual  Machine code for each line.  44PROGRAMMING PARADIGM--SOUMYA K
  • 45.  Linker  • Tool that merges the object files produced by separate compilation or assembly and creates an executable file  • Three tasks  – Searches the program to find library routines used by program, e.g. printf(), math routines,…  – Determines the memory locations that code from each module will occupy and relocates its instructions by adjusting absolute references  – Resolves references among files. 45PROGRAMMING PARADIGM--SOUMYA K
  • 46.  Loader  • Part of the OS that brings an executable file residing on disk into memory and starts it running  • Steps  – Read executable file’s header to determine the size of text and data segments  – Create a new address space for the program  – Copies instructions and data into address space  – Copies arguments passed to the program on the stack  – Initializes the machine registers including the stack ptr  – Jumps to a startup routine that copies the program’s arguments from the stack to registers and calls the program’s main routine. 46PROGRAMMING PARADIGM--SOUMYA K
  • 47.  Scripting languages:  Scripting languages, which can be embedded within HTML, commonly are 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 and Python are examples of scripting languages. 47PROGRAMMING PARADIGM--SOUMYA K
  • 50.  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. 50PROGRAMMING PARADIGM--SOUMYA K
  • 51.  Example1:  <html> <head> <title>Title of the document</title> </head> <body> The content of the document...... </body> </html> 51PROGRAMMING PARADIGM--SOUMYA K
  • 52.  Example2:  <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> <p> hai alll …. How are you </p> </body> </html> 52PROGRAMMING PARADIGM--SOUMYA K
  • 53.  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. 53PROGRAMMING PARADIGM--SOUMYA K
  • 54.  <?xml version="1.0" standalone="yes"?>  <conversation>  <greeting>Hello, world!</greeting>  <response>Stop the planet, I want to get off!</response>  </conversation> 54PROGRAMMING PARADIGM--SOUMYA K
  • 55. 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. 55PROGRAMMING PARADIGM--SOUMYA K
  • 56.  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 itsown 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. 9. HTML is about displaying data, hence static but XML is about carrying information, hence dynamic. 56PROGRAMMING PARADIGM--SOUMYA K
  • 57. PROGRAMMING LANGUAGE  A programming language is a set of commands, instructions, and other syntax use to create a software program.  By using this program a user can communicate with the digital machine  We can control and co-ordinate the hardware components of the system.  Programming languages can be used to create programs to control the behavior of a machine  a programming language has two components : syntax (form) and semantics (meaning). 57PROGRAMMING PARADIGM--SOUMYA K
  • 58. The different types of languages  Not any computer programming language can do anything.  There are limitations, and actually, different languages are used for different tasks  1 . WEB LANGUAGES  2. SOFTWARE LANGUAGES 58PROGRAMMING PARADIGM--SOUMYA K
  • 59. WEB LANGUAGES  Used for creating and editing pages on the web.  Can do anything from putting plain text on a webpage, to accessing and retrieving data from a database.  Web programming refers to the writing, markup and coding involved in Web development, which includes Web content, Web client and server scripting and network security.  The most common languages used for Web programming are HTML, JavaScript, Perl 5 and PHP.  Web programming is different from just programming, which requires interdisciplinary knowledge on the application area, client and server scripting, and database technology. 59PROGRAMMING PARADIGM--SOUMYA K
  • 60.  1. JavaScript  most popular and dynamic programming languages used for creating and developing websites.  This language is capable of achieving several things including controlling the browser, editing content on a document that has been displayed, allowing client- side scripts to communicate with users.  It was developed by Netscape and borrows a lot of its syntax from C language.  JavaScript is used very widely and effectively in creating desktop applications as well as for developing games. 60PROGRAMMING PARADIGM--SOUMYA K
  • 61. main features of JavaScript programming language  Structured – JavaScript is a highly structured language with a proper and planned syntax that has been derived from C. It differentiates between statements and expressions  Dynamic – The types in JavaScript are not related with variables but with values. This is a dynamic programming language that enables you to test the type of an object in many different ways. Also, this programming language is object-oriented where all the objects are associative arrays.  Functional – All functions in JavaScript are objects and are all first-class. They are associated with their own functions as well as characteristics. For example, a function within a function is called a nested function whereas this language also supports anonymous function. 61PROGRAMMING PARADIGM--SOUMYA K
  • 62. PHP  define PHP Hypertext Processor language that is a free server-side scripting language  It has been designed for not just web development but also as a general-purpose programming platform.  websites powered by this platform include Facebook, WordPress  PHP is an open source language and fast prototyping language.  This language is compatible with UNIX based OS as well as Windows OS.  Some industries where PHP is mostly used include startup businesses, advertising apps, and small software organizations as well as media agencies.  The language can be embedded in HTML directly. 62PROGRAMMING PARADIGM--SOUMYA K
  • 63. Features of php  Simple  Platform independent  Open source  Case insensitive  Interpreted  Loosely typed: support variable usage with out declaring its data type 63PROGRAMMING PARADIGM--SOUMYA K
  • 64.  Java  Java is yet another highly popular and widely used language that you can consider for web development.  This language is an object-oriented, class-based and concurrent language that was developed by Sun Microsystems  It is a secure and robust programming language  It is object-oriented, simple language  It is capable of being implemented and executed with high performance.  It is threaded, dynamic and interpreted.  It is portable and architecture-neutral. 64PROGRAMMING PARADIGM--SOUMYA K
  • 65.  Xml  XML is designed to describe data but is not concerned with the data’s visualization.  The tags created in XML are self explanatory and the user is free to define their own tags — hence the “extensible.”  Simplicity, portability, platform independence, and usability are some of the key features  allowing users to create custom defined tags according to XML Document Type Definition (DTD) standards. 65PROGRAMMING PARADIGM--SOUMYA K
  • 66.  VBScript  A language developed by Microsoft that works only in Microsoft's Internet Explorer web browser and web browsers based on the Internet Explorer engine  VBScript Can be used to print dates, make calculations, interact with the user, and more  Features of VBScript  VBScript is a lightweight scripting language, which has a lightning fast interpreter.  VBScript, for the most part, is case insensitive. It has a very simple syntax, easy to learn and to implement.  Unlike C++ or Java, VBScript is an object-based scripting language and NOT an Object-Oriented Programming language.  It uses Component Object Model (COM) in order to access the elements of the environment in which it is executing.  Successful execution of VBScript can happen only if it is executed in Host Environment such as Internet Explorer (IE), Internet Information Services (IIS) and Windows Scripting Host (WSH) 66PROGRAMMING PARADIGM--SOUMYA K
  • 67. SOFTWARE LANGUAGES  Used for creating executable programs.  We can create anything from simple console programs that print some text to the screen to entire operating systems.  Vary greatly in terms of power and complexity.  1. C programming lang An advanced programming language used for software application development.  Originally developed by Dennis Ritchie at Bell Labs in the 1970's  designed to be a systems programming language but since then has proven itself to be able to be used for various software applications such as business programs, engineering programs, and even games.  The UNIX operating system is written in C. 67PROGRAMMING PARADIGM--SOUMYA K
  • 68.  C++ Descendant of the C language.  The difference between the two languages is that C++ is object-oriented.  C++ was developed by Bjarne Stroustrup at Bell Labs  it is a very popular language for graphical applications.  Features of C++  C++ is fast This offers a huge boost in speed that high level languages like Python, Java don’t give you.  C++ is a multi-paradigm programming language C++ supports at least 7 different styles of programming and gives developers the freedom to choose one at their will.  Object oriented programming with C++ Object oriented programming helps you solve a complex problem intuitively. 68PROGRAMMING PARADIGM--SOUMYA K
  • 69.  Java A powerful and flexible language created by Sun MicroSystems that can be used to create applets (a program that is executed from within another program) that run inside webpages as well as software applications.  Features of Java Programming Language  Java is platform independent An object-oriented Language Java is fast Java is secure  Large Standard Library 69PROGRAMMING PARADIGM--SOUMYA K