Вы находитесь на странице: 1из 20

Introduction to Programming

What is Programming?
Programming, also called software
engineering, is a multistep process for creating
a program.
It uses algorithms a set of ordered steps for
solving a problem and which is essentially
synonymous with logic.

Why Programming?
There are at least two good reasons for learning
programming at this point:
1. Programming helps dispel the mysteriousness
of the computer
2. Learning programming will enable you to find
out quickly whether youll like it, and whether
you have the analytical turn of mind needed.

Steps in Program Development


1.
2.
3.
4.
5.

Requirement Analysis
System Design
Construction
Testing and Validation
Documentation and Maintenance

Requirement Analysis
Requirement is a description of what a system
should do.
It involves the collection of information and the
definition of the characteristics or features of the
desired system.

Requirement Analysis
Problem Analysis Requires performing the
following steps:
1. Define the problem and the users.
2. Determine the desired outputs.
3. Determine the input to achieve the desired
outputs.
4. Determine the processes involve.
5. Check the feasibility of implementing the
program.
6. Document the analysis.

System Design
The program design process describes the
algorithm for the solution of the problem.
The algorithms specify what actions and
operations a program will take.
To formulate the algorithm, a programmer may
choose between flowcharts, decision tables or
pseudocodes.

System Design
FLOWCHART is a pictorial representation of
an ordered, step-by-step solution to a problem.
It is a map of what your program is going to do
and how it is going to do it.s
1. Program Flowchart It is a visual outline of
an algorithm in which the steps and processes to
be followed are represented with symbols.
2. System Flowchart - It is a diagrammatic
representation of the broad flow of work,
documents and operations.

Program Flowchart
START

INPUT

PROCESS

OUTPUT

END

System Flowchart
Process 1

Process 1.1

Process 1.1.1

Process 1.2

Process 1.1.2

Process 1.3

Process 1.3.1

Process 1.3.3

Process 1.3.2

SYMBOL

MEANING

SYMBOL

MEANING

Initialization

Input / Output

Decision

Flow Lines

Beginning or End
of the Program
(Terminator)

On-page
Connector

Process

Off-page
Connector

System Design
PSEUDOCODE It is an algorithm written in
normal Human language statements to describe
the logic and processing flow.
Example:
if the list of payroll tasks(algorithm) looks like this:

Get the employee name, hourly rate, hours worked, deductions


Calculate the gross pay and net pay
Write name, gross pay and net pay

The pseudocode would look like this:


READ name, hourly rate, hours worked, deductions
CALCULATE: Gross pay = hourly rate times hours worked
CALCULATE: Net pay = Gross minus deductions
WRITE name, Gross pay, Net pay

Construction
The actual writing of the program based on the
design specifications (coding).
The design specifications serve as high level
blueprints to the programmers or software
engineers as they construct the system one
program at a time.

Construction
Construction requires performing the following steps:
1. Select the appropriate programming language.

Machine Languages
Assembly Languages
High-Level Languages

2. Follow the syntax.


NOTE:
Syntax is the grammar of the programming language. It
consists of rules governing the structure and content of the
statements.

Testing and Validation


Program testing involves running various tests,
such as desk checking and debugging called
alpha testing, and then running actual or real
data to make sure the program works.

Testing and Validation


Testing and validation requires the following steps:
1. Perform desk-checking.
Desk checking is manually testing the solution
design to make sure that it is free of errors and that the
logic works.

Translating. Translator is a program that translates your


program into language the computer can understand.
Programs are most commonly translated by an assembler,
compiler or an interpreter.

Testing and Validation

An assembler translates a program written from an assemble


language to a low-level language.
A compiler translates a high-level language to a low level
language at one time, giving you all the error messages
called diagnostics- at once.
An interpreter translates a high-level language to a low- level
language one line at a time.

Testing and Validation


2. Debug the Program

Debugging means detecting, locating, and


removing all errors in a computer program.
Types of Errors
a. Syntax Error- is the most common error and
incorrect use of programming language statements.
b. Run-time error- is a software error that occurs while
a program is being executed.
c. Logical Error- are incorrect use of control structures.

3. Run real data.

Documentation and Maintenance


Documentation is a written detailed description
of the programming cycle and specific facts
about this program. It is the set of instructions
shipped with a program or a piece of hardware.
It includes necessary instructions on the use and
maintenance of the product.
Maintenance is any activity designed to keep
programs error-free, up-to-date and in good
working condition.

Вам также может понравиться