Introduction to Programming
Principles Languages
FP101
PROGRAMMING
PRINCIPLES
WEEK 3
LO 1
Explain the basic computer and programming fundamentals with
appropriate examples of language and technology.
Group activity:
orm a group with 6 members.
ist the following:
- Computer components
- Hardware
- Software
-Operating System
- Application
1.1 Computer Fundamentals
omputer is a device capable of performing computations and making
logical decisions at speed millions (even billions) of times faster than
human beings can.
omputer systems will include the computer along with any software
and peripheral devices that are necessary to make the computer
function.
1.1.1 Computer System Environment
The peripheral devices
5
Keyboard (Input Device)
Speaker
(Output
Device)
Hard disk (Secondary Storage)
Memory i.e. RAM & ROM
(Primary Storage)
Floppy disk (Secondary Storage)
CD ROM, DVD ROM
(Secondary Storage)
Mouse (Input Device)
Printer (Output Device)
Monitor
Screen
(Output
Device)
1.1.1 Computer System Environment
The peripheral devices
 Input Devices
 Capture/receive input from users
 Central Processing Unit (CPU)
 Execute instructions; compute, compare and
transform data
 Primary Storage or Main Memory
 Permanent storage for data/programs
 Output Devices
 Produce output/result
 Secondary Storage Devices
 Temporary storage for data/programs
1.1.1 Computer System Environment
The Software's
 Computer process data under the control
of sets of instructions called computer
programs.
 Also called as software programs.
 There are two types of software which
are operating system and application
software
Operating system
 consisting of programs and data, that runs
on computers, manages computer hardware
resources, and provides common services
for execution of various application
software.
 For hardware functions such as input and
output and memory allocation, the
operating system acts as an intermediary
between application programs and the
computer hardware
 Ex: LINUX, UNIX, MICROSOFT WINDOWS
1.1.1 Computer System Environment
The Software's
Application software
 is computer software designed to help
the user to perform singular or multiple
related specific tasks.
 Ex: Microsoft office, Adobe Photoshop,
Windows Media Player
1.1.1 Computer System Environment
The Software's
1.2 Evolution of Programming Language
n the computer industry, these abbreviations are widely
used to represent major steps or "generations" in the
evolution of programming languages.
1.2 Evolution of Programming Language
1.2.1 History of Programming Language and
Approaches
he history of computers starts out about 2000 years ago, at the
birth of the abacus, a wooden rack holding two horizontal wires
with beads strung on them.
abbage with different machine.
unch card by Hollerith.
lectronic digital computer
Stored program” EDC
dvance in 1950’s
Group activity:
orm a group of 6 members.
ind information on the evolution of programming language.
ach group choose from the following topic:
- machine language
- assembly language
- 3rd
generation language
- 4th
generation language
- 5th
generation language
• In the computer industry, these abbreviations are widely
used to represent major steps or "generations" in the
evolution of programming languages.
• Various categories of programming language and
technology :
a. Machine languages
b. Assembly languages
c. 3rd Generation Languages
d. 4th Generation Languages
e. 5th Generation Languages
1.2.2 Various Categories Of Programming
Language And Technology
st
Generation Language (GL1)
irst-generation language was (and still is) machine language
or the level of instructions and data that the processor is
actually given to work on (which in conventional computers
is a string of 0s and 1s).
nstruct computers to perform their most elementary
operations one at a time.
xample of 1GL:
1.2.2 Various Categories Of Programming
Language And Technology
+1300042774
+1400593419
+1200274927
nd
Generation Language
econd-generation language is assembler (sometimes called
"assembly") language.
typical 2GL instruction looks like this:
n assembler converts the assembler language statements into
machine language.
1.2.2 Various Categories Of Programming
Language And Technology
ADD 12,8
rd
Generation Language
hird-generation language is a "high-level" programming
language, such as PL/I, C, or Java.
ava language statements look like this:
1.2.2 Various Categories Of Programming
Language And Technology
public boolean handleEvent (Event evt) {
switch (evt.id) {
case Event.ACTION_EVENT: {
if ("Try me" .equald(evt.arg)) {
compiler converts the statements of a specific high-level
programming language into machine language.
In the case of Java, the output is called byte code, which is
converted into appropriate machine language by a Java virtual
machine that runs as part of an operating system platform.)
3GL language requires a considerable amount of programming
knowledge.
1.2.2 Various Categories Of Programming
Language And Technology
th
Generation Language
ourth-generation language is designed to be closer to natural
language than a 3GL language.
anguages for accessing databases are often described as 4GLs.
4GL language statement might look like this:
EXTRACT ALL CUSTOMERS WHERE
"PREVIOUS PURCHASES" TOTAL MORE THAN $1000
1.2.2 Various Categories Of Programming
Language And Technology
GL Features:
a) user friendly
b) portable and independent of operating systems
c) usable by non-programmers
d) having intelligent default options about what the user wants
e) allowing the user to obtain results fasts using minimum
requirement code generated with bug-free code from high-level
expressions
1.2.2 Various Categories Of Programming
Language And Technology
th
Generation Language
Fifth-generation language is programming that uses a visual or
graphical development interface to create source language that
is usually compiled with a 3GL or 4GL language compiler.
icrosoft, Borland, IBM, and other companies make 5GL visual
programming products for developing applications in Java, for
example.
isual programming allows you to easily envision object-oriented
programming class hierarchies and drag icons to assemble
program components.
1.2.2 Various Categories Of Programming
Language And Technology
1.3 Fundamentals of Programming
Language
programming language is an artificial language designed to
communicate instructions to a machine, particularly a computer.
Programming languages can be used to create programs that control
the behavior of a machine and/or to express algorithms precisely.
1.3.1 Terminologies in Programming Language
rogrammer is someone who writes computer software.
he term of computer programmer can refer to a specialist in one area
of computer programming or to a generalist who writes code for
many kinds of software.
1.3.1 Terminologies in Programming
Language
rogram is a sequence of instructions written to perform a specified
task with a computer.
1.3.1 Terminologies in Programming
Language
rogramming is the process of designing, writing, testing, debugging,
and maintaining the source code of computer programs.
1.3.2 Language Translator
ssembler
- Assembler for an assembly language, a computer program to translate between
lower- level representations of computer programs.
ompiler
- A compiler is a computer program (or set of program) that transforms source
code written in a computer language (the source language) into another computer
language (the target language, often having a binary form known as object code).
ranslator/ Interpreter
- many high-level programming languages have the
option of using an interpreter instead of a compiler.
1.3.3 Relate Programming Language in Real
Life
obot
and phone Application
TM Machine
nline Application
1.3.4 Differentiate between Structured and
Object Oriented Programming

Introduction to programming principles languages

  • 1.
    Introduction to Programming PrinciplesLanguages FP101 PROGRAMMING PRINCIPLES
  • 2.
    WEEK 3 LO 1 Explainthe basic computer and programming fundamentals with appropriate examples of language and technology.
  • 3.
    Group activity: orm agroup with 6 members. ist the following: - Computer components - Hardware - Software -Operating System - Application
  • 4.
    1.1 Computer Fundamentals omputeris a device capable of performing computations and making logical decisions at speed millions (even billions) of times faster than human beings can. omputer systems will include the computer along with any software and peripheral devices that are necessary to make the computer function.
  • 5.
    1.1.1 Computer SystemEnvironment The peripheral devices 5 Keyboard (Input Device) Speaker (Output Device) Hard disk (Secondary Storage) Memory i.e. RAM & ROM (Primary Storage) Floppy disk (Secondary Storage) CD ROM, DVD ROM (Secondary Storage) Mouse (Input Device) Printer (Output Device) Monitor Screen (Output Device)
  • 6.
    1.1.1 Computer SystemEnvironment The peripheral devices  Input Devices  Capture/receive input from users  Central Processing Unit (CPU)  Execute instructions; compute, compare and transform data  Primary Storage or Main Memory  Permanent storage for data/programs  Output Devices  Produce output/result  Secondary Storage Devices  Temporary storage for data/programs
  • 7.
    1.1.1 Computer SystemEnvironment The Software's  Computer process data under the control of sets of instructions called computer programs.  Also called as software programs.  There are two types of software which are operating system and application software
  • 8.
    Operating system  consistingof programs and data, that runs on computers, manages computer hardware resources, and provides common services for execution of various application software.  For hardware functions such as input and output and memory allocation, the operating system acts as an intermediary between application programs and the computer hardware  Ex: LINUX, UNIX, MICROSOFT WINDOWS 1.1.1 Computer System Environment The Software's
  • 9.
    Application software  iscomputer software designed to help the user to perform singular or multiple related specific tasks.  Ex: Microsoft office, Adobe Photoshop, Windows Media Player 1.1.1 Computer System Environment The Software's
  • 10.
    1.2 Evolution ofProgramming Language n the computer industry, these abbreviations are widely used to represent major steps or "generations" in the evolution of programming languages.
  • 11.
    1.2 Evolution ofProgramming Language
  • 12.
    1.2.1 History ofProgramming Language and Approaches he history of computers starts out about 2000 years ago, at the birth of the abacus, a wooden rack holding two horizontal wires with beads strung on them. abbage with different machine. unch card by Hollerith. lectronic digital computer Stored program” EDC dvance in 1950’s
  • 13.
    Group activity: orm agroup of 6 members. ind information on the evolution of programming language. ach group choose from the following topic: - machine language - assembly language - 3rd generation language - 4th generation language - 5th generation language
  • 14.
    • In thecomputer industry, these abbreviations are widely used to represent major steps or "generations" in the evolution of programming languages. • Various categories of programming language and technology : a. Machine languages b. Assembly languages c. 3rd Generation Languages d. 4th Generation Languages e. 5th Generation Languages 1.2.2 Various Categories Of Programming Language And Technology
  • 15.
    st Generation Language (GL1) irst-generationlanguage was (and still is) machine language or the level of instructions and data that the processor is actually given to work on (which in conventional computers is a string of 0s and 1s). nstruct computers to perform their most elementary operations one at a time. xample of 1GL: 1.2.2 Various Categories Of Programming Language And Technology +1300042774 +1400593419 +1200274927
  • 16.
    nd Generation Language econd-generation languageis assembler (sometimes called "assembly") language. typical 2GL instruction looks like this: n assembler converts the assembler language statements into machine language. 1.2.2 Various Categories Of Programming Language And Technology ADD 12,8
  • 17.
    rd Generation Language hird-generation languageis a "high-level" programming language, such as PL/I, C, or Java. ava language statements look like this: 1.2.2 Various Categories Of Programming Language And Technology public boolean handleEvent (Event evt) { switch (evt.id) { case Event.ACTION_EVENT: { if ("Try me" .equald(evt.arg)) {
  • 18.
    compiler converts thestatements of a specific high-level programming language into machine language. In the case of Java, the output is called byte code, which is converted into appropriate machine language by a Java virtual machine that runs as part of an operating system platform.) 3GL language requires a considerable amount of programming knowledge. 1.2.2 Various Categories Of Programming Language And Technology
  • 19.
    th Generation Language ourth-generation languageis designed to be closer to natural language than a 3GL language. anguages for accessing databases are often described as 4GLs. 4GL language statement might look like this: EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000 1.2.2 Various Categories Of Programming Language And Technology
  • 20.
    GL Features: a) userfriendly b) portable and independent of operating systems c) usable by non-programmers d) having intelligent default options about what the user wants e) allowing the user to obtain results fasts using minimum requirement code generated with bug-free code from high-level expressions 1.2.2 Various Categories Of Programming Language And Technology
  • 21.
    th Generation Language Fifth-generation languageis programming that uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler. icrosoft, Borland, IBM, and other companies make 5GL visual programming products for developing applications in Java, for example. isual programming allows you to easily envision object-oriented programming class hierarchies and drag icons to assemble program components. 1.2.2 Various Categories Of Programming Language And Technology
  • 22.
    1.3 Fundamentals ofProgramming Language programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely.
  • 23.
    1.3.1 Terminologies inProgramming Language rogrammer is someone who writes computer software. he term of computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software.
  • 24.
    1.3.1 Terminologies inProgramming Language rogram is a sequence of instructions written to perform a specified task with a computer.
  • 25.
    1.3.1 Terminologies inProgramming Language rogramming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs.
  • 26.
    1.3.2 Language Translator ssembler -Assembler for an assembly language, a computer program to translate between lower- level representations of computer programs. ompiler - A compiler is a computer program (or set of program) that transforms source code written in a computer language (the source language) into another computer language (the target language, often having a binary form known as object code). ranslator/ Interpreter - many high-level programming languages have the option of using an interpreter instead of a compiler.
  • 27.
    1.3.3 Relate ProgrammingLanguage in Real Life obot and phone Application TM Machine nline Application
  • 28.
    1.3.4 Differentiate betweenStructured and Object Oriented Programming