0% found this document useful (0 votes)
2 views25 pages

Introduction to Programming

Uploaded by

atrosebellelex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views25 pages

Introduction to Programming

Uploaded by

atrosebellelex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

INTRODUCTION TO

PROGRAMMING
PROGRAMMING
The process of developing and implementing various
sets of instructions to enable a computer to do a
certain task.

The action or process of writing computer programs.


DATA VS. INFORMATION
Data
are raw facts (texts) and or figures (numbers)
which are meaningless until they are interpreted.
DATA VS. INFORMATION
Information
are useful processed data.
interpreted, organized, structured data
basically, the data plus the meaning of what the
data was collected for
PROCEDURE VS. COMPUTER PROGRAM
Procedure
a logical sequence of actions, either consciously or
subconsciously, to carry out a certain task or process.
PROCEDURE VS. COMPUTER PROGRAM
Computer Program
A computer program is nothing but a set of
instructions (smallest unit of execution) that are used
to execute particular tasks to get particular results.
Elements of Procedure
Action: The sequence of steps to be taken
Order: specifies the logical arrangement of the actions.
Data: the elements operated upon by the action.
Language: medium of communication.
Computer Program
Computer: is an electronic device designed to
manipulate data
Program: is asset of instructions to carry out a
particular task.
Computer program: is a set of instructions which
directs computer to perform or carry out a particular
task
Elements Computer Program
Operation: define the series of action to be followed by
the computer.
Order: specifies the logical arrangement of the
operations.
Data: the elements operated upon by the operations.
Language: the medium by which the operation are
communicated.
Programming Development Life Cycle (PDLC)
Five (5) Stages
1. Problem Analysis
2. Program Design
3. Program Coding
4. Program Debugging and Testing
5. Program Implementation and Maintenance
Program Documentation
It entails the preparation of a documents describing
how the program is constructed, together with all the
significant resources surrounding its creation.

This phase is performed at every stage of the program


development such that an output of each development
stage is documented.
STAGE 1: Problem Analysis
Identify the needs to solve the problem.

The stage wherein a good definition of the problem are


considered and where the program specification is
developed.
Program Specification
Is a document being prepared as a part of system
design which contain the following:
Program background
I/O Specifications
Program Methodology
STAGE 2: Program Design
It is the stage where logical sequence/arrangement of
operations for the solution have to be planned.

ALGORITHM
is a written series of logical instructions which accomplish
solution to a problem.
Developed by using any of the program design tools
such as charts, flowcharts, decision table, pseudo cades, etc.
Program Design Tools
1. Structure/Hierarchy chart: depicts the overall
organization of a programs, it show how
segments/modules are defined and how they
relate to one another.
2. Flowchart: it shows the graphical presentation of
an algorithm.
Program Design Tools
3. Decision Table: is a table showing the actions to be
taken for different combinations of condition
(conditions and actions)
4. Pseudo codes: it describes the logical flow of the
solution to a problem through the use of English-
like statements (structured English)
STAGE 3: Program Coding
Actual coding, making the actual application.

Coding: the process of writing the actual program


steps in the proper format for particular programming
language.
Five (5) Factors that may affect the
programming language used are:
• Suitability
• Integration
• Standards
• Portability
• Development speed
STAGE 4: Program testing and debugging
Source code: a computer program before it is complied.
Object code: the machine language version of the computer
program generated after the program source code is
compiled.
Compiler: is a system special software which translates a
programming language into machine language and assemble
the program to check errors upon correct usage of
programming language.
Two (2) main types of errors:
1. Syntax error
occurs when the programmer has not followed
the rules of the programming language.
2. Logical error
occurs when running a program producers
incorrect results.
Two (2) main types of errors:
1. Syntax error
occurs when the programmer has not followed
the rules of the programming language.
2. Logical error
occurs when running a program producers
incorrect results.
Two (2) main types of errors:
1. Syntax error
occurs when the programmer has not followed
the rules of the programming language.
2. Logical error
occurs when running a program producers
incorrect results.
Syntax Error
#include <iostream>
using namespace std;

int main() {
cout << "Hello World!“ Missing semi colon here
return 0;
}
Logical Error
#include <iostream>

int main() {
double num1 = 10.0;
double num2 = 20.0;
double num3 = 30.0;
double average;

average = num1 + num2 + num3 / 3;

std::cout << "The average is: " << average << std::endl;

return 0;
}
STAGE 5: Program Implementation and
Maintenance
It is the final stage of program development life
cycle which involves the running the system
and updating the software as needed.

Program continually be modified or revised to


cope with changes and persistently be useful.

You might also like