Sunteți pe pagina 1din 21

Programming And

Prepared By :
Nurul Najwa Md Yusof
• Program is a list of instructions for the
computer to follow to accomplish the task
of processing data into information
Six step procedure
Step 1
Step 6
Program Step 2
maintenance Program design

Step 5
Program Step 3
implementation Program code

Step 4
Program test
Program Specification
Outputs Objectives

Step 1
Program Design

Processing Document
• 1. Objectives – the problem you are trying to
• 2. Output – The list of what you want to get out
of the computer (imagine yourself as end user)
• 3. Input – What will be the input data and what
will be the source of data
• 4. Processing – The processing tasks that must
happen for input data to be processed into
• 5.Document – Record all program objectives,
desired outputs, inputs and required processing
Program Design
• In the program design step, a solution is
created using programming techniques
such as top-down program design,
pseudocode, flowcharts, and logic

Step 2
Program design Code

Top-down Program Design
Time and billing

Obtain input Produce output

Obtain daily Compute hours Print client Print time and

logs for billing bills billing report

Compute time on
Client bills
client jobs
Pseudo code
• An outline of the logic of the program you
will write. It is like doing a summary before
it is written.

a. Set total regular hours and total overtime hours to zero

b. Get time in and time out for a job
c. If worked past 5pm hours, then compute overtime hours
d. Compute regular hours
e. Add regular hours to total regular hours
f. Add overtime hours to total overtime hours
Flow charts

Proses Keputusan

Input/output Mula/ tamat

Logical Structure
• Sequence structure (Follow
each other)
• Selection structure
• Loop struture
Program code
• The actual writing of a program. Good
programs are structured program

• Good programs
- reliable
- it should catch obvious and common
input errors
- understandable by other programmers
• Coding
- Write the program
- e.g.: HTML, DHTML, XML for web pages
- e.g.: C, C++, C#, Java for processing
data and information
Program test
Manual test Deskcheck

Step 4
Translate Program test Document

Sample data Beta test

• Debugging is testing a program and
eliminating errors.(Running the program
and then fixing the parts that do not work)
• Syntax errors are violations of a
programming rules (e.g: no semicolon)
• Logic errors are created by incorrect or
missing specifications(e.g.: wrong
Testing process
1.Desk checking – programmer checks
printout of the program
2.Manually testing with sample data –
Looking for programming logic errors and
compare with manually calculated values
3.Attempt at translation – Convert the
program to a machine language and
translating program will locate the error
4. Testing sample data on the computer –
Used sample data to test the correct
execution of each program
5. Testing by a select group of potential
users – Potential users try out the program
and provide feedback through beta
Program Documentation

Step 5
Finalize Program Maintenace

• Documentation consists of written
descriptions and procedures about a
program and how to use it
• Documentation is important to:\
a. Users: How to use the software
b. Operators: They need to know what to
do when error occurs
c. Programmers: For maintenance (text
and program flowcharts, program listings,
sample output, system flowcharts)
Program Maintenace

Ease of Use

Step 6 Specification
Program maintenance


Change of needs
• Maintenance is needed to adapt to the
changing needs of an organization
• It is also to ensure that current programs
are error free, efficiently and effectively