You are on page 1of 5

Palawan State University

MODULE 1 Bachelor of Science in Information Technology


Quezon Campus
COMPUTER PROGRAMMING 1

Page | 1 Prepared by Ms. Heraine Jane D. Cortado


Palawan State University
MODULE 1 Bachelor of Science in Information Technology
Quezon Campus
COMPUTER PROGRAMMING 1

2 Chapter
THE PROGRAM DEVELOPMENT LIFE CYCLE
Programmers do not sit down and start writing code right away when trying to make a computer
program. Instead, they follow an organized plan or methodology that breaks the process into a
series of tasks.

Here are the six stages in developing a computer program.

1. Defining the problem


2. Designing a solution to the problem
3. Writing a program
4. Compiling, debugging, and testing the program
5. Documenting the program
6. Maintaining the program

1. PROBLEM DEFINITION

A programmer is usually given a task in the form of a problem. Before a program


can be designed to solve a particular problem, the problem must be well and clearly defined
first in terms of its input and output requirements.

A clearly defined problem is already half the solution. Computer programming requires us to
define the problem first before we even try to create a solution.

Let us now define our example problem:

“Create a program that will determine the number of times a Student name occurs in a list.”

Problem Analysis

After the problem has been adequately defined, the simplest and yet the most
efficient and effective approach to solve the problem must be formulated. Usually, this step
involves breaking up the problem into smaller and simpler sub problems.

 Example Problem:
Determine the number of times a Student name occurs in a list

 Input to the program:


List of student names, name of student to look for

 Output of the program:


The number of times the student name occurs in a list

2. DESIGNING A SOLUTION TO THE PROBLEM

When problem is defined properly, we can start designing the solution to the
problem. In designing, we must be able to breakdown the problem into several steps so
that it is easier for us to solve the problem in smaller pieces.

Algorithm
A clear and unambiguous specification of the steps needed to solve the problem? It
may be expressed in either Human language (English, Tagalog), through a graphical
representation like a flowchart or through a pseudocode. It also refers to well defined
procedures or instructions to solve a problem.

Page | 2 Prepared by Ms. Heraine Jane D. Cortado


Palawan State University
MODULE 1 Bachelor of Science in Information Technology
Quezon Campus
COMPUTER PROGRAMMING 1
Now given the problem defined in the previous sections, how do we express our general solution in such a
way that it is simple yet understandable?

 Expressing our solution through Human language:

1. Get the list of names


2. Get the name to look for, let's call this the key name
3. Compare the key name to each of the names in the list
4. If the key name is the same with a name in the list, add 1 to the count
5. If all the names have been compared, output the result

 Expressing our solution through a flowchart:

o A flowchart is a graphical representation of sequence of operation. It uses symbols to


represent the type of processing performed in a program.

 Expressing our solution through pseudocode:

o It is a version of the instructions decribing each steps that the computer must follow. It
is written in an abbreviation form of spoken language and there lies somewhere
commands written in ordinary English and those in a computer language.

Watch the Video


Video # 3: Designing a Solution to the Program

Page | 3 Prepared by Ms. Heraine Jane D. Cortado


Palawan State University
MODULE 1 Bachelor of Science in Information Technology
Quezon Campus
COMPUTER PROGRAMMING 1
Flowchart

A flowchart is a design tool used to graphically represent the logic in a solution. Flowcharts typically
do not display programming language commands. Rather, they state the concept in English or
mathematical notation. Here are some guidelines for commonly used symbols in creating flowcharts. You
can use any symbols in creating your flowchart, as long as you are consistent in using them.

Watch the Video


Video # 4: Flowchating

Page | 4 Prepared by Ms. Heraine Jane D. Cortado


Palawan State University
MODULE 1 Bachelor of Science in Information Technology
Quezon Campus
COMPUTER PROGRAMMING 1

3. WRITING A PROGRAM

After the programmer define the problem and designed a solution the next step is to write a
program.

1. Program should be easy to read and understand


2. Programs should be efficient
3. Programs should be reliable
4. Program must be robust
5. Program should be maintainable

4. COMPILING, DEBUGGING, AND TESTING THE PROGRAM

Compiler
A computer program that transforms source code written in programming language
into computer language.

Debugging
A process of locating and fixing or bypassing bugs in the computer program code
or the engineering of a hardware device “Process of correcting programming
errors”.

Testing
A method of assessing the functionality of software program and a process
checking if a program actually performs its functions as planned.

5. DOCUMENTATION OF THE PROGRAM

Consist of written descriptions and explanations of program and other materials associated
with an organization’s data processing system.

1. A complete description of the contents and formats of all data inputs, outputs and files
to be used.

2. A statement of hardware requirements for running the program, as well as estimated


processing time and storage requirements.

3. A statement of software requirements, such as utility programs and library programs.

6. MAINTAINING THE PROGRAM

During the implementation of the system, there are some changes in the program that will
occur depending on the nature of the system that is being developed. Maintenance is one
of the most important aspects in developing a computer program in a sense that there are
errors or bugs that spotted by the user it should be fixed as soon as possible in order to
avoid big problems along the way of using the system.

Types of Programming Errors

1. Syntax errors – Errors due to the fact that the syntax of the language is not respected.
2. Semantic errors – Errors due to an improper use of program statements.
3. Logical errors – Errors that occur when the specification is not respected.
4. Compile time errors – Syntax errors and static semantics error indicated by the compiler.
5. Runtime errors – dynamic semantic errors and logical errors that can be detected by the
compiler (debugging).

Page | 5 Prepared by Ms. Heraine Jane D. Cortado

You might also like