0% found this document useful (0 votes)
54 views29 pages

ITEC102 Chapter 1

This document discusses programming languages. It defines a programming language as a set of rules for communicating algorithms to a computer. It explains that a program is a structured entity produced using a programming language, and that programming is the process of creating instructions to tell a computer how to perform a task. The document then covers different types of programming languages including low-level languages like machine code and assembly, as well as high-level languages like FORTRAN, COBOL, C, C++, Java and HTML. It also discusses programming paradigms and how programming languages are similar to human languages in how they are learned and used.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views29 pages

ITEC102 Chapter 1

This document discusses programming languages. It defines a programming language as a set of rules for communicating algorithms to a computer. It explains that a program is a structured entity produced using a programming language, and that programming is the process of creating instructions to tell a computer how to perform a task. The document then covers different types of programming languages including low-level languages like machine code and assembly, as well as high-level languages like FORTRAN, COBOL, C, C++, Java and HTML. It also discusses programming paradigms and how programming languages are similar to human languages in how they are learned and used.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

ITEC102 – INTEGRATIVE

PROGRAMMING TECHNOLOGIES
Chapter 1
What is a programming language?
What is Program?
What is Programming?
What are the types of programming languages?
Programming Paradigm
A programming language is a set of rules that
provides a way of telling a computer what
operations to perform.
A programming language is a set of rules for
communicating an algorithm
It provides a linguistic framework for
describing computations
A programming language is a notational system for
describing computation in a machine-readable and
and
human-readable form.

AAprogramming
programminglanguage
languageisisaatool
toolfor
fordeveloping
developing
executable
executablemodels
modelsfor
foraaclass
classofofproblem
problemdomains.
domains.
 English is a natural language. It has words,
symbols and grammatical rules.
 A programming language also has words,
symbols and rules of grammar.
 The grammatical rules are called syntax.
 Each programming language has a different set
of syntax rules.
What is Program?

 A program is something that is produced using a


programming language
 A program is a structured entity with Semantics
What is Programming?

 Is the process of creating a set of instruction that tell a


computer how to perform a task.
 Direct creation of binary code.
 An artificial language that is used to control a
computer.
High-level program class Triangle {
...
float surface()
return b*h/2;
}

Low-level program LOAD r1,b


LOAD r2,h
MUL r1,r2
DIV r1,#2
RET

Executable Machine code 0001001001000101


0010010011101100
10101101001...
 First Generation Languages
 Second Generation Languages
 Third Generation Languages
 Fourth Generation Languages
 Fifth Generation Languages
 Machine language
◦ Operation code – such as addition or subtraction.
◦ Operands – that identify the data to be processed.
◦ Machine language is machine dependent as it is
the only language the computer can understand.
◦ Very efficient code but very difficult to write.
 Assembly languages
◦ Symbolic operation codes replaced binary
operation codes.
◦ Assembly language programs needed to be
“assembled” for execution by the computer. Each
assembly language instruction is translated into
one machine language instruction.
◦ Very efficient code and easier to write.
 Closer to English but included simple
mathematical notation.
◦ Programs written in source code which must be
translated into machine language programs called
object code.
◦ The translation of source code to object code is
accomplished by a machine language system
program called a compiler.
 Alternative to compilation is interpretation which
is accomplished by a system program called an
interpreter.
 Common third generation languages
◦ FORTRAN
◦ COBOL
◦ C and C++
◦ Visual Basic
 A high level language (4GL) that requires fewer
instructions to accomplish a task than a third
generation language.
 Used with databases
◦ Query languages
◦ Report generators
◦ Forms designers
◦ Application generators
 Declarative languages
 Functional(?): Lisp, Scheme, SML
 Also called applicative
 Everything is a function
 Logic: Prolog
 Based on mathematical logic
 Rule- or Constraint-based
 Imperative Programming
 Object-Oriented Programming
 Logic/Declarative Programming
 Functional/Applicative Programming
 Event Driven Programming
 Two broad groups
 Traditional programming languages
 Sequences of instructions
 First, second and some third generation languages
 Object-oriented languages
 Objects are created rather than sequences of
instructions
 Some third generation, and fourth and fifth
generation languages
 FORTRAN
◦ FORmula TRANslation.
◦ Developed at IBM in the mid-1950s.
◦ Designed for scientific and mathematical
applications by scientists and engineers.
 COBOL
◦ COmmon Business Oriented Language.
◦ Developed in 1959.
◦ Designed to be common to many different computers.
◦ Typically used for business applications.
 BASIC
◦ Beginner’s All-purpose Symbolic Instruction Code.
◦ Developed at Dartmouth College in mid 1960s.
◦ Developed as a simple language for students to write
programs with which they could interact through
terminals.
 C
◦ Developed by Bell Laboratories in the early 1970s.
◦ Provides control and efficiency of assembly
language while having third generation language
features.
◦ Often used for system programs.
◦ UNIX is written in C.
 Simula
◦ First object-oriented language
◦ Developed by Ole Johan Dahl in the
1960s.
 Smalltalk
◦ First purely object-oriented language.
◦ Developed by Xerox in mid-1970s.
◦ Still in use on some computers.
 C++
◦ It is C language with additional features.
◦ Widely used for developing system and
application software.
◦ Graphical user interfaces can be developed
easily with visual programming tools.
 JAVA
◦ An object-oriented language similar to C++
that eliminates lots of C++’s problematic
features
◦ Allows a web page developer to create programs
for applications, called applets that can be used
through a browser.
◦ Objective of JAVA developers is that it be
machine, platform and operating system
independent.
 Scripting Languages
 Command Languages
 Text processing Languages
 HTML
◦ HyperText Markup Language.
◦ Used on the Internet and the World Wide Web
(WWW).
◦ Web page developer puts brief codes called tags in
the page to indicate how the page should be
formatted.
 XML
◦ Extensible Markup Language.
◦ A language for defining other languages.
A language is a language
 Programming languages are languages
 When it comes to mechanics of the task, learning
to speak and use a programming language is in
many ways like learning to speak a human
language
 In both kind of languages you have to learn new
vocabulary, syntax and semantics (new words,
sentence structure and meaning)
 And both kind of language require considerable
practice to make perfect.
 Computer languages lack ambiguity and
vagueness
 In a programming language a sentence either
means one thing or it means nothing

You might also like