ST.
PAUL COLLEGES FOUNDATION PANIQUI TARLAC
INC.
LECTURE 1:
PROGRAMMING CONCEPTS
Bachelor of Science in
Computer Science
LEARNING OBJECTIVES:
define software and hardware;
identify types of programmers;
explain the steps of problem
solving;
identify the elements of
programming; and
classify the programming
paradigms.
INTRODUCTION
To many people,
computers may seem
intelligent machines because
they can do tasks efficiently and
easily, but in actuality, they are
just machines which will not do
anything unless the tasks are
specified by the users using
programs that are executed
into them.
SOFTWARE
A software is a collection of codes
that instructs the computer on what it will
do. Another term for software is
computer program.
The lists of instructions are called
program codes and the process of typing
these codes into a computer is called
program coding or simply coding.
For complicated or large programs, say, the NEUST enrolment
m, the program is consists of two sets of codes, the first are codes
struct the computer and the second set is consists of codes which contain data.
PROGRAMMERS
The people who write program codes are called
programmers.
SYSTEM PROGRAMMERS
These are the people who create and maintain
programs which are involved in the computer’s basic
operating functions like operating systems, utilities
and device drivers.
APPLICATION PROGRAMMERS
They are the ones who create and maintain
programs that have specific functions such as Point Of
Sale (POS) programs that calculate and generate the
payroll report of a certain company, and others.
TYPES OF APPLICATION PROGRAMMERS
DATABASE APPLICATION
PROGRAMMERS
WEB APPLICATION PROGRAMMERS
GAME DEVELOPERS
MICRO DEVICES PROGRAMMERS
HARDWARE
The physical
components of a computer
system is called hardware.
It may be consisted of the
CPU, the keyboard, the LCD
screen and other peripherals
like mouse, printer, webcam,
etc. These are the tangible
parts of the computer
system which you can
touch.
PROBLEM SOLVING
Just like when writing
a term paper, the first step
in creating an effective
program is proper thought
and preparation. Planning
for the final output is very
important so as to have
the solution that you are
picturing in your mind for a
particular problem.
STEPS IN PROGRAMMING
PLANNING
ANALYSIS
DESIGN
DOCUMENTAT
ION
DEVELOPMENT
TESTING AND
DEBUGGING
STEPS IN PROGRAMMING
Program planning involves
PLANNING
multiple steps including the
identification of a
problem, selection of
desired outcomes,
assessment of available
resources,
implementation, and
evaluation of the
program.
STEPS IN PROGRAMMING
In the analysis stage, you
PLANNING must determine the precise
objectives that you want to
ANALYSIS achieve to create a solution to
the presented problem. The
material that the program
generates is called OUTPUT.
A FILE, which is stored by name,
is a collection of information. A
file may contain data, a program
or some other document.
STEPS IN PROGRAMMING
PLANNING After deciding what the output
will be, you should determine the
information that is needed to
ANALYSIS achieve your objectives. These data
that the program requires to produce
the desired results are called INPUT.
Next will be to decide what will
be the major steps required for
processing the input to produce the
output. A PROCESS is a mechanism
for converting input to output.
STEPS IN PROGRAMMING
PLANNING After analyzing the
problem, we use this analysis
ANALYSIS to design a solution. You can
use modeling tools to guide
DESIGN you in designing a solution to
the problem.
Examples of such tools
are FLOWCHARTS and
ALGORITHMS.
STEPS IN PROGRAMMING
PLANNING In this step, you
translate the design into a
ANALYSIS program. Writing computer
instructions using any of the
DESIGN available programming
languages is called CODING.
DEVELOPMENT These computer instructions
or simply statements are
called CODES.
STEPS IN PROGRAMMING
Testing the problem’s
PLANNING
solution on the computer
overlaps with the design and
ANALYSIS
development phases. Testing
is done so that all the
DESIGN
computer errors or simply
called BUGS will be eliminated
DEVELOPMENT
or corrected and the process
TESTING AND
of correcting errors is referred
DEBUGGING to as DEBUGGING.
STEPS IN PROGRAMMING
Documentation means
that you have to create
materials that will generally
describe all the things you did
in the whole process of
developing a project or a
program. All the steps in
DOCUMENTATI programming require
ON documenting for the purpose of
reference.
ELEMENTS OF PROGRAMMING
INPUT
The necessary information is collected at the start of
programming. This means getting the INPUT into the
program. The data you type, the click of the mouse, sources
coming from compact disks or flash drives are input values.
DATA
There should be a place to keep the input. These
inputs are now called DATA. Data are raw values which
are not yet subjected into any manipulation.
ELEMENTS OF PROGRAMMING
OPERATIONS
The data are then applied with the correct
OPERATIONS to manipulate it. The OPERATIONS can be:
Assigning values to constants and variables;
Subjecting values to different mathematical operations
using the plus (+), minus (-), asterisk (*), slash (/) and
modulo (%); and
Comparing values using relational operators and logical
operators like OR (||), NOT (!), AND (&&), etc.
ELEMENTS OF PROGRAMMING
OUTPUT
The manipulated data will be extracted from
the program and sent back to the user. The
extracted data is referred to as OUTPUT.
CONDITIONAL EXECUTION
Data can also be manipulated using conditional
execution or BRANCHING. There may be codes that
require comparison first before execution.
ELEMENTS OF PROGRAMMING
LOOPS
Data can also be manipulated using looping.
LOOPS execute a set of instructions until the condition
inside the loop statement evaluates to false.
SUBROUTINES
Data are sometimes manipulated by breaking them into small
pieces and are executed at different locations in the program. These are
called subroutines which are methods or sets of instructions that are
executed by the program by calling their specific names throughout the
program.
PROGRAMMING PARADIGMS
PROCEDURAL
Procedural paradigm is running the codes line by line
without skipping any of the statements, the order of which is
which statement comes first, which is second and so on and
so forth.
MODULAR
Modular paradigm is when you turn a huge
program into small ones with simpler codes.
PROGRAMMING PARADIGMS
DATA ABSTRACTION
The data abstraction paradigm is hiding the
attributes of the data making it appear more
compound than more primitive.
OBJECT-ORIENTED PROGRAMMING
A programming methodology that represents
concepts as “objects” that have specific attributes
and methods.
END OF LECTURE 1