DFC 1023
PROBLEM SOVING AND
PROGRAM DESIGN
CHAPTER 1:
INTRODUCTION TO
PROGRAMMING LANGUAGE
Page 1
COURSE LEARNING OUTCOME
(CLO):
Upon completion of this course, students
should be able to:
1) Explain the basic computer and
programming fundamentals with appropriate
examples of languages.
Page 22
SPECIFIC OUTCOME
1.1 Discuss the evolution of programming
language.
1.2 Describe fundamentals of programming
language.
Page 3
Page 4
1.1 Discuss The Evolution
Of Programming Language
Page 5
Page 6
Page 7
Page 8
Page 9
1.1.1) HISTORY OF
PROGRAMMING LANGUAGE
Before1940 The 1940s The 1950s 1967 – 1978
and 1960s
• The • Plankalkül , • Logo, B,
languages ENIAC • FORTRA Pascal, Forth,
were Codes coding N, LISP, C, Smalltalk,
system COBOL Prolog, ML,
Scheme, SQL
Current trend The 1990s : Internet The 1980s
age • C++,
• C#, Visual Basic . NET, F#,
Scala, Factor, Windows Poer • Haskell, Python, Objecyive-C,
shell, Clojure, Groovy, Go Visual Basic, Ruby, Ada,Common
Lua, CLOS, Java, Lisp, Eiffel,
Delphi, JavaScript, Erlang, Perl, Tcl,
PHP, Rebol, D FL
Page 1100
TECHNOLOGY OF PROGRAMMING
LANGUAGE
Machine Languages
Using Vacuum Tubes
Assembly Languages
Using Transistors
3rd Generation Languages
Using Integrated Circuits
4th Generation Languages
Using Microprocessors
5th Generation Languages Page 1111
Using Artificial Intelligence
1) MACHINE LANGUAGES
Only languages understood by computers
Also called machine code
A set of instructions for a specific central processing unit,
designed to be usable by a computer without being translated
impossible for humans to use because they consist entirely of
numbers
The lowest-level programming language
Every CPU has its own unique machine language. Programs must
be rewritten or recompiled, therefore, to run on different types of
computers
Page 1122
2) ASSEMBLY LANGUAGES
a low-level programming language implements a symbolic
for computers, microprocessors, representation of the machine
codes and other constants needed
microcontrollers, and other
programmable devices to program a given CPU
architecture
usually defined by the hardware same structure and set of
manufacturer, and is based on commands as machine languages,
but they enable a programmer to
mnemonics that symbolize
processing steps (instructions), use names instead of numbers
processor registers, memory
locations, and other language
features
an assembly language program
written for one type of CPU won't
run on another
Page 1133
3) 3rd GENERATION LANGUAGES
a refinement of a make the languages
second-generation more
programming programmer-friendly
language
High level language Most 3GLs support
structured
programming
Example: Fortran, Page 1144
ALGOL, and COBOL,
C, C++, C#, Java,
BASIC and Delphi
4) 4th GENERATION LANGUAGES
a programming
language or
programming
environment designed
with a specific purpose
in mind, such as the
development of
commercial business
software
Most 4GLs are used to to reduce programming
access databases effort, the time it takes to
develop software, and the
cost of software
development
fourth-generation
languages are
programming languages
closer to human
languages than typical
high-level programming
languages. (COBOL)
Page 1155
5) 5th GENERATION LANGUAGES
a programming language designed to make the computer solve
based around solving a given problem without the
problems using constraints programmer - the programmer only
given to the program, rather needs to worry about what problems
than using an algorithm need to be solved and what
written by a programmer conditions need to be met, without
worrying about how to implement a
routine or algorithm to solve them
based on artificial Fifth-generation languages are
intelligence, are still in used mainly in artificial
development, though there
are some applications, such intelligence research. Prolog, OPS
5, and Mercury
as voice recognition
Page 16
Page 17
1.2 Describe Fundamentals
Of Programming Languages
Page 18
1.2.1) DEFINITIONS
Programmer
• someone who writes computer software
• a specialist in one area of computer programming or to a
generalist who writes code for many kinds of software
Program
• An organized list of instructions that, when executed,
causes the computer to behave in a predetermined
manner
Programming
• the process of designing, writing, testing, debugging,
and maintaining the source code of computer programs
Page 1199
STRUCTURED PROGRAMMING
the top-to-bottom It splits the tasks into This type of program
approach modular forms. This accomplishes certain
makes the program tasks for that a specific
simpler and easier to
read with less lines and reason
codes
decomposed into a .A process may be
hierarchy of processes. composed of other, more
A process in this context
specialized processes,
is a body of code, i.e., it may be a function
typically a function or that calls other functions
subroutine, that takes
some input and
manipulates it to produce
an output
Page 20
OBJECT ORIENTED PROGRAMMING
uses sections in a It splits the program into They are small
program to perform objects that can be programs that can be
reused into other used in other software
certain tasks programs
Each object or module An object-oriented
has the data and the program is decomposed
instruction of what to do
with the data in it. This into a network of
can be reused in other collaborating objects.
An object represents a
software thing or concept and
has a known set of
behaviours that may be
invoked by other objects
Page 21
1.2.2) LANGUAGE TRANSLATORS
Assembler
• A program that translates programs from assembly
language to machine language.
Compiler
• a computer program (or set of programs) that
transforms source code written in a programming
language (the source language) into another
computer language (the target language, often having
a binary form known as object code)
Translator Page 2222
• A program that translate from one programming
language into another
1.2.3) RELATE THE PROGRAMMING
LANGUAGES APPLICATION IN REAL
LIFE
Page 23
Thank You
Page 24