Third Fourth ith
Generation Generation | Generation
Programming
Language
High-level
Programming
Language.
nas)
Langue:
First Generation Second Generation
cr Chong Seng, 16 Muthu, 18
Suns = studying suya
: Monitoring the 2 Duty in rer .
Example: library System
Data Types
Status:
Constants versus Variables
Usage
oe _
Constants Variables
Use constan when you Use vorab to store
ra nn ‘dat that may or wil
Constants Variables ‘change midway in your ¡cronos dra ie
nn running of he program.
mooiry =
fronts oval M
Valve is not Value can be changed
Characteristics | changeable during the | anytime during the
course of the program. | course of the program.
Use constant when YoU | yee variable to store
want to declare something | eya may may sore
Constants versus Variables mat wont be changed || Change during t
midway In your program =
neers running of the program,
Characteristics
(553% pp
Constants Variables
Valse inet chongeable Value con be changed
een envie during he
E Data Types Examples
progam. use of he program. vp
18,79, 21
15,314
ing _ |KokKeong, Amira, Eden, Alex
Boolean TRUE, FALSE
AND Operator ‘OR Operator
‘Can you buy the goods? | can you moke a drink?
Yes
Divide Mully
x
Eromple of
“operator
Boolean Operations
20+15=35
20-15=5
20 x 15 = 300
20 +15= 1.33
Boolean Operations
Operator's Symbol
CES | e |
Ger [ares]
=
This program vil basically
colculate the Volume of a
sphere based on the given
value r
En
1, Request price ofitem
5. Pint final price
END
variables: price of em, scout
tole, final rice
process
|
decision
[no
ferminetor
¿prntriEnter 0 numt
Frcan(Yed" anumit}
¿nom
control the flow
cf aprogram, | péniche)
En
control
Statement 1
y
Statement 2
+
Statement 3
+
ze more items on my shopping List
Purchase next item and cross it off ny lise
ee
ono ines 7 BEGIN
a | So > i
Product
“al
product <= 3000 EBEN product = products
Jo
ES
sequence
conto!
Program Design Phone.
Coding Phore
Testing and Debugging Phase
Documentation Phase
Step 1
ZL, rvomargetner N
as Step 2
Step 3
wRepoces _ /Comeicte
ster
1 (step 4 tne target set
Increase of students make the
registration more and more
difficult.
Registration must be made by
the comput
Purpose of the school
‘computerise the registration of
new students
Input Proces Ouiput
Request Students Name
Request Student's NRIC
Request students Gender
Verity students dota
FoR own design model
Main Program
Student Registration
Problems slutions
users don't understand Programmers use
what they want Whiteboards fo sketch data
flows of the user or cllent's
users wan't commi lo a set |» programmers must ensure thal eau
they get the cents signature ander CR
of approval for the program = 0
reauirements
‘of witlen requirements
= users Insist on new Programmers must clearly
requirements after the cost plain al They will charge
Gnu schedule nove been xed extra coss or any
à sched bent requirements not previously
spechied by users
+ communication with users |» programmers mus! constanity
core slow Interact wilh the user or cllent mem
+ users often do ne progrommers should show rie lane
participate in reviews or are | users some sample programs.
Incapable ol doing so (erotetyping)
Case Study
RECN
hoo needs school registration y
ram o computers th registration Request students name, NRC,
aden. ‚gender, phone number, date of
Dit, parents name ond address
student who emo inthe Print class
‘Top-down design model should have al his or her E
o Very aline data 1
eo
EE
EP forthe coming sonen
yew orem ‘Any eld emp? Pint enor
EE E eco
Flow chart
Basing Form Input ntertoc
‘Sample ‘Student Registation
Nic
Gender:
Phone Number:
Bote o th
ens Name
ese’
___oupputintertoce
loss
gos Det erstes sy ese]
= cm
int Dim x At Integer
double x Dim x As Double
cho x Dim x As Shing
Extreme Programming Practices
Student Registration EEE
Nome
nic:
nd
| Date of sh and nd & *=men
Adress
Students Clas
Leaving out required
punctuation
Typing command
words out of order
not defined
Syntax Errors 9 Logic Errors M Run-time Errors
STUDENT REGISTRATION
[Pata tro iense try again] Inaccurate Ouiput
Desk Checking
Declaro Mane, MRSC, gender, rhone
Problem definition Documentation Package
Top-down design mode!
flow char pseudo code
{Corrente win the source progrom
poros
al]
Tok ie
Top-down Design Model
y
1
iz
Existing Form
Sample
Book enquiy form
y
y
vb et =
Library System
Input intetoce
Output inertace
‘stole
me
Pobliher + Fraser
Stats kiss
‘cheek
Fifth Generation Language
OpenGL (Graphic Library)
muriveo or NN liv) (or) NN’
‘Mike sow the mon withthe tel
+ simplicity: alms to make
programming simpler and
more accessible to the public
+ less work: alms lo move Ihe hard
work from the human to the system
+ cross platform: i also eliminates the
diferent hardware factor, the same
code or Input can be used in
diferent target platform
+ would require a person to un
the compuler system architecture
‘and programming language syntax
+ he computer that has lo work hard
computing Ihe program code
vis tightly related with the system's
hardware and operating system