La5 programming

smkengkilili2011 1,712 views 30 slides Jul 13, 2011
Slide 1
Slide 1 of 30
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30

About This Presentation

No description available for this slideshow.


Slide Content

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

e Tnput_Statue = true

Birth =1

[senor pue T somero ||
a ===

Dim Address As gering,
Address = "Kuala Lumpur"

‘Multiply Operator
A=20, 8-15

Answer» A[+]8

Muret

Ga

Greater than
A © B

Greater than or Less than or
equal lo equal to

£

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
Tags