You are on page 1of 35

Computer

Programming I
Compiled by:

Mary Ann B. Taduyo


Learning Outcome
 Recognizes the different programming
concepts.
 Explains the basic principle of problem
solving
 Explain the concepts of programming cycle.
 Understand the basic programming
elements.
Program Logic
Formulation
Program Logic
Formation
Usually defined as the process of coming up
with the appropriate methodology in developing
a specific program logic that will perform a
prescribed computing task or solve a problem
using the computer.
Programming
Concepts
Logic

 Is the systematic study of reasoning that


provides standards by which valid reasoning
can be recognized.
Programming

 Computer process data under the control of


set of instruction
Programmer

 Computer program guide the computer


through orderly sets of actions by people.
Programming
Language
 A set of rules that provides a way of telling a
computer what operation to perform.
Program Development
Intelligence is one of the key characteristics
which differentiate a human being from other
living creatures on the earth.

Basic intelligence covers day to day problem


solving and making strategies to handle different
situations which keep arising in day to day life.
Problem Solving
 Can you think of a day in your life which goes
without problem solving? Answer to this question is
of course, No. In our life we are bound to solve
problems.
 In our day to day activity such as purchasing
something from a general store and making
payments, depositing fee in school, or withdrawing
money from bank account.
Problem Solving
Example 1:
If you are watching a news channel on
your TV and you want to change it to a
sports channel, you need to do something
Problem Solving
Example 2:
One Monday morning, a student is ready to go to
school but yet he/she has not picked up those
books and copies which are required as per
timetable.
Problem Solving
Example 3:
If someone asks to you, what is time now in….?
Problem Solving
Example 4:
Some students in a class plan to go on picnic and
decide to share the expenses among them.
Problem Solving
The purpose with the above example problem
solving is to get you to think about the problem
differently and have some fun while solving it, both
of which will enhance your creativity in finding and
implementing a solution.
Programming Cycle
 The computer is basically a problem-solving
tool. Once it is properly provided with a valid
program, the computer becomes self-
operational, that is, it requires no human
intervention during processing.

 To use this tool effectively, the programmer


usually has to perform the following set of well
define steps.
Programming Cycle
Defining the Problem

 One of making sure what was has to be


done or what problem has to be solved.
Programming Cycle
Planning the Solution
This is the next step, after the problem has been
defined, select the best method for solving the
problem.
To save on time and effort, the programmer
refers to a pictorial representation, the program
flow chart.
The flow chart is an all-purpose tool and a
program blueprint.
Programming Cycle
Coding the Solution
 Once the programmer is satisfied that all
processing steps have been identified and all
alternatives and exceptions provided for, the
program is then made.
Programming Cycle
Checking out the
program
 Experience will prove that a program seldom
executes successfully the first time. Even the
simplest programs contain errors, and even
experienced programmers make mistakes.
Programming Cycle
Documentation
 After a program has been fully tested and
implemented, the programmer must write up the
full specifications for all users.
Programming Cycle
Documentation
The technical documentation package should
include:
1. Complete statement of the problem.

2. Description of the program logic and


copies of the flow charts.

3.Final source listing.


Programming Cycle
Documentation
The technical documentation package should
include:

4. List and description or error tests along


with the disposition of these error.

5. Operating instructions, including


program and data structures, and test
data used.
Programming Cycle
Documentation
The technical documentation package should
include:

6. Input and output specifications.

7. Schedules to be maintained.
Programming Cycle
Defining what
Write up the full has to be done
Defining the
specifications for Problem or what problem
other program users has to be solved

Select the best


Planning the
Documentation
Solution method for
solving the
problem
Perform
debugging and Prepare the set of
testing the instructions for the
program, using computer to execute
Checking Out Coding the
representatives the Program Solution
input data
Programming
Elements
Basic Programming
Elements
Input – getting data and commands into the
computer.

Output – getting your results out of the


computer.

Arithmetic - performing mathematical


calculations on your data.
Basic Programming
Elements
Conditional – testing to see if a condition is
true or false.

Looping – cycling through a set of


instructions until some condition
is met.
Be Ready for Guided
Exercises
Guided Exercises 1

1. Draw and Label the Programming


Cycle
Direction:
> Draw/Write the programming cycle in a ½ Yellow Pad or
a band paper or in Canvas (then upload it in canvas)
> Label and write a short description in your own words
for each process
> If you draw it in paper, capture or screenshot your
answer, then upload it to Canvas.
Guided Exercises 1

2. Write the basic programming


Direction: elements
> Draw/Write what was shown in
this slide in a ½ Yellow Pad or in a 1 2
bond paper or in Canvas (then upload
it in canvas) 3 4
> Label and write basic
programming elements and explain it
5
in your own words.
> If you draw it in paper, capture or
screenshot your answer, then upload it
to Canvas.
Discussion of answers in
Guided Exercises 1

You might also like