Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

Lesson 3 - The Programming Process

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lesson 3 - The Programming Process

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

INTRODUCTION

TO
PROGRAMMING
In the past lesson we
discussed..
• Introduction to Computer
Programming
• What is Computer Programming?
• Programming Languages
• Types of Computer Programs
• Uses of Computer Programs
Today, we’ll talk about..
• Programming process
The Programming Process
In the Program Development Life
Cycle or PDLC, this is a methodological
way of developing a program, there are
five phases in the program development,
namely:

• Defining the problem


• Planning the solution
• Coding the program
• Testing the program
• Documenting the program
Defining the Problem
Defining the problem means
identifying and analyzing the situation
that leads to the problem. This is very
important in finding a solution before the
program is written. Data is collected as
well as program requirements from the
users to identify the problem that the
program is expected to resolve.
Defining the Problem
To identify the problem, system analysts
typically look at these concerns:
• What is the problem?
• How do people solve the problem
currently?
• What is needed for the solution process?
• What is the expected output of the
solution?
Planning the Solution
This phase is also called Designing of
the Program.
Program design starts by focusing on
the main goal that the program is trying to
achieve and then breaking the program
into manageable components, each of
which contributes to this goal.
It is setting a guide for what the
program will do and how it will do it.
Planning the Solution
Program designing or planning the
solution involve using the following
planning tools:
• Flowcharts
• Algorithm
Flowchart
A flowchart is a step-by-step-solution
to a problem that uses symbols as
representation of the processes. It consists
of arrows representing the flow of the
process and boxes and symbols
representing the action in each process.
Flowchart
Start

Enter NUM1

Calculate the sum of two numbers.


Enter NUM2

Calculate SUM
as NUM1+NUM2

Display the
SUM

End
Flowchart
Start

Enter
Income

Enter
Find the profit/loss by comparing
Cost the income and cost.

Is income Yes Calculate Profit Display


greater
than cost? as Income-Cost Income

No

Calculate Loss
as Cos-Income

Display Loss End


Flowchart
The following are some of the symbols used in preparing
flowcharts:
Symbol Name Function

Terminal It indicates the beginning and end of


(Start/End) the program/process.
Instructions that is to be carried out
Process
by the program.
Indicates the process of input and
Input/Output
output of data.
Used to split the flowchart sequence
Decision into multiple paths representing
selection or repetition.
Flow
Indicates the flow of the process.
Lines/Arrows
Predefined Reference another program within
| | Process the program.
Used to show a jump from one point
Connector
in the process flow to another.
Flowchart
Start

Enter NUM1
Calculate the sum of two numbers.

Enter NUM2
The symbol used:

Terminal (Start/End)
Calculate SUM
as NUM1+NUM2
Input/Output
Display the
SUM Process

End Arrow Lines


Start

Flowchart
Enter
Selling

Find the profit/loss by comparing


price

Enter Cost the income and cost.


Price
The symbol used:
Is selling
Yes Calculate Profit
price Display
greater
than cost
as Selling-Cost
price
Profit Terminal (Start/End)
price?

No Input/Output
Calculate Loss as
Cost-Selling price
Process
Decision
Display Loss End
Arrow Lines
Algorithm
Similar to flowcharts, an algorithm is a
procedure for problem-solving by executing
a sequence of steps taken. Unlike the
flowchart, however, the algorithm does not
use symbols or any pictorial
representation. Instead, the processes are
written in lists.
Flowchart
Algorithm
Start

Step 1: Start
Enter NUM1 Step 2: Enter the first
number (NUM 1)
Enter NUM2 Step 3: Enter the second
number (NUM 2) Calculate the sum of
two numbers.
Calculate SUM as Step 2: Calculate the sum as
NUM1+NUM2
NUM 1 + NUM 2
Display the
SUM
Step 2: Display the result
Step 2: End
End
Coding the Program
The next stage it to transfer the
solution to the problem in the computer
program. You will interpret the logic from
the prepared flowchart, or pseudo-code
into the actual programming codes based
on which programming language you are
going to use.
Coding the Program
Coding the program operates grammatically
somewhat like the English language. There are
sets of rules, called syntax, that determine if the
program will work, and how is it going to work.
Although each programming language has
different syntaxes form one another, the concept
of implementation is usually similar. Therefore,
learning multiple programming language is not
going to be very complicated.
Coding the Program
These are some of the tools needed to start
writing a program:

• Text Editor
• Integrated Development Environment
(IDE)
• Compiler
Questions?
Comments?
Share it with the
class.
That’s all for
Thank
today!you.
Keep safe.
God bless.

You might also like