0% found this document useful (0 votes)
3 views6 pages

Module 3 the Process of Program Execution

The document outlines the process of computer program execution, emphasizing the importance of understanding program components and the role of the programmer. It details the steps involved in creating a program, including defining the problem, designing a solution, coding, testing, and documenting the program. Each step is crucial for ensuring the program effectively solves the intended problem and is maintainable for future modifications.

Uploaded by

saksakpare
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
3 views6 pages

Module 3 the Process of Program Execution

The document outlines the process of computer program execution, emphasizing the importance of understanding program components and the role of the programmer. It details the steps involved in creating a program, including defining the problem, designing a solution, coding, testing, and documenting the program. Each step is crucial for ensuring the program effectively solves the intended problem and is maintainable for future modifications.

Uploaded by

saksakpare
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 6

10

Computer
Programming
Quarter II – Module 3:
THE PROCESS OF PROGRAM EXECUTION

"Designed by macrovector / Freepik"


Learn

In your previous lesson, we studied about components of computer


program.
All the components of computer program must be present in creating a
program. The uses and functions of each components really need to
understand in order to have a good computer program.
Now we are going to study about process of computer program
execution.

The Process of Program Execution


All computer programs were created to solve problems. These programs
are very useful to human to ease some burden especially on their work.

The most important person involves in this module is the computer


programmer. He creates instructions that tells the computer what to do by
writing and testing code that allows applications and software programs to
operate successfully.
Process of program execution are the following:
 Define the problem to solve
 Design a solution
 Draw a flowchart
 Create a pseudo-code
 Write the program
 Test the program
 Document the program

I. Define the Problem


A programmer creates program to solve a problem. Therefore, the
programmer must know first the problem, the needs of the customer on how it
will be used, and the capacity of users to operate the program.

II. Design a Solution

After identifying the things required to solve a problem, then the next step
is to design a solution. A design is a description of steps of a program. It
doesn't have to be written in any special programming language - English will do.

And also, a programmer should be able to take a design and write the
program from it without having to think too hard. It's looks like an architect's
drawing: it contains all the important structures without showing every bit of
brick and mortar.
III. Draw a Flowchart

A flowchart is a pictorial representation of a sequential process of a


program to solve a problem. It comprises of arrows for the direction, boxes and
other symbols representing actions. It serves as a map of the program on what
and how to do it. This will be discussed in the future module.
Example from
https://homepage.cs.uri.edu/faculty/wolfe/book/Readings/Reading13.htm :

IV. Create a Pseudo-code

Pseudocode is a way of describing a program which looks like an outline


in order to focus on the logical part of the program although it is not an
executable file. It is just a draft of a program.
Example from
https://homepage.cs.uri.edu/faculty/wolfe/book/Readings/Reading13.htm :
Place 0 in sum
Place 0 in counter
Enter first number
DOWHILE the number is not equal to 999
Add number to sum
Add 1 to counter
Enter the next number or 999
ENDDO
Divide sum by counter to get average
Write the average
V. Write/Code the Program

This time, the programmer has to type the program code to the computer.
These are list instructions to be run in a program.
On this stage, the programmer has to sit and type the command lines of a
program. Coding is the act of translating the design into an actual program,
written in some form of programming language. It is like writing an essay. And,
like essays, there are things needed to include in the program such as titles,
introductions, references etc.).

VI. Test the Program


After coding the program, you must prepare to test it on the computer.
This step involves these phases:
1. Desk-checking
This phase is similar to proofreading that sometimes avoided by the
programmer who looks for a shortcut and eager to run the program on the
computer once it is written. With careful desk-checking you may discover
several errors and possibly save time in the long run. In desk-checking
you simply sit down and mentally trace, or check, the logic of the program
to ensure that it is error-free and workable. Some organizations take this
phase a step further with a walkthrough, a process in which a group of
programmers-your peers-review your program and offer suggestions in a
collegial way.

2. Compiling
In this phase, a compiler translates the program into a binary
machine code, checks the programming language syntax, and displays
syntax-error messages.

3. Debugging

Debugging is the process of detecting and removing of existing


and potential errors (also called as ‘bugs’) in a software code that can
cause it to behave unexpectedly or crash. To prevent incorrect operation
of a software or system, debugging is used to find and resolve bugs or
defects. It is the task of looking at the original program, identifying the
mistakes, correcting the code and recompiling it. In this phase also, the
programmer run the program using test data that you develop. You must
plan the test data carefully to make sure you test every part of the
program.

It is not necessary to write the entire program before you start to


compile and debug it. It is better to write a small section of the code first,
get that to work, and then move on to the next stage. This reduces the
amount of code that needs to be debugged each time and generally
creates a good feeling of "getting there" as each section is completed.
VII. Document the Program
Documentation is a written detailed description of the programming
cycle and specific facts about the program. Typical program documentation
materials include the origin and nature of the problem, a brief narrative
description of the program, logic tools such as flowcharts and pseudocode, data-
record descriptions, program listings, and testing results. Comments in the
program itself are also considered an essential part of documentation.

The wise programmer continues to document the program throughout its


design, development, and testing. Documentation is needed to supplement
human memory and to help organize program planning. Also, documentation is
critical to communicate with others who have an interest in the program,
especially other programmers who may be part of a programming team. And,
since turnover is high in the computer industry, written documentation is needed
so that those who come after you can make any necessary modifications in the
program or track down any errors that you missed.

Notes to the Teacher


You may use any computer programming language which
is familiar to you so that will be easier for you to explain, discuss,
and give examples on this topic.
You may add a leaflet for your discussions and examples.

You might also like