0% found this document useful (0 votes)
1K views16 pages

ICT-reviewer Grade 8

The document outlines the program development life cycle (PDLC) which consists of 5 phases: analyzing, designing, coding, debugging and testing, and implementing and maintaining. It then describes each of the 5 steps in more detail: 1) problem analysis, 2) program design, 3) program coding, 4) program testing and debugging, and 5) program documentation and maintenance. Key aspects of each step like pseudocoding, flowcharting, debugging, and documentation are explained. Finally, it covers data types, variables, constants and guidelines for flowcharting.

Uploaded by

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

ICT-reviewer Grade 8

The document outlines the program development life cycle (PDLC) which consists of 5 phases: analyzing, designing, coding, debugging and testing, and implementing and maintaining. It then describes each of the 5 steps in more detail: 1) problem analysis, 2) program design, 3) program coding, 4) program testing and debugging, and 5) program documentation and maintenance. Key aspects of each step like pseudocoding, flowcharting, debugging, and documentation are explained. Finally, it covers data types, variables, constants and guidelines for flowcharting.

Uploaded by

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

Programming Cycle

Program Development Life Cycle (PDLC) - The process containing the


five phases of program development: analyzing, designing, coding,
debugging and testing, and implementing and maintaining application
software.

Five Steps of Programming Cycle

1. Problem Analysis - Methodical investigation of a problem and the


separation of the problem into smaller related units for further
detailed study.
Steps:
- Define the problem and the users
- Determining the desired outputs
- Determining the desired Inputs
- Determining the desired processing
- Double-check the feasibility of implementing the program
- Document the analysis
2. Program Design - Selecting the best method for solving the
problem. Involves determining the sequence of processing steps
within individual programs including
Algorithm using Pseudocoding and flowcharting
● Determine the program logic using a top-down approach and
modularization

● Design details using algorithm, flowchart and pseudocode


Algorithm - A list of instructions for carrying out some process
step-by-step.
Flowchart - A visual outline of an algorithm in which he steps and
processes to be followed are represented by symbols.
Pseudocode - An algorithm written in normal human-language
statements to describe the logic and processing flow of the
program.

● Do a structured walk through

3. Program Coding - Programmer converts the steps depicted in the


program flow chart into readable instructions that make up the
actual program. Can be written at Machine or High Level
programming languages.
4. Program Testing & Debugging - Program testing involves running
various tests, such as desk-checking and debugging (These two are
called alpha testing) and then running actual or real data to make
sure the program works
Steps:
- Perform desk checking - this is simply reading through
(proofreading) or manually testing, the solution design to
make sure that it is free of errors and that the logic works.
- Debug the program
- Run real data
- Debug the program - After desk-checking, the programmer
needs to compile the source code to convert it to an object
code.
- A source code refers to the instructions in a programming
language
- An object code refers to the instructions in a machine
language which is the language of the computer
- The process of converting a source code into an object code is
called a compilation

3 types of syntax error


1. Syntax Error - the most common error the programmer may
encounter. Caused by typographical error or failure to strictly
follow the syntax.
2. Run-Time Error - a software errors that occurs while a program is
being executed, as detected by a compiler or other supervisory
program. Mostly occurs in numeric occasions.
3. Logic Error - caused by the incorrect use of control structures.
These errors are much more difficult to detect than syntax error
because the computer cannot tell an error in a logic in a program.

5. Program Documentation Maintenance - In this step, the


programmer makes a detailed description on how the program was
created.
Algorithm
Basic Flowchart symbols

TERMINAL - It defines the starting and ending point of a flowchart.


Represents the beginning and the end of the program. It contains the words “BEGIN”
or “START” and “END” or “STOP”.

INPUT/OUTPUT - The inputting of data for processing, and the printing


out of processed data. / ACTION Represents the step wherein information such as
letters and numbers are entered by the user or produced by the process.

PROCESS - Manipulation of data / STEPS (assignments and


mathematical computations). Represents a step or an instruction such as arithmetic
operations and comparisons.

DECISION - Process conditions using relational operators. Used for


trapping and filtering data. Denotes a decision to be made. It involves 2 courses
of action that is answerable by either “yes/true” or “no/false” wherein one has to be
chosen. The symbol represents the “If...Then” and the “For...Next” statements.

INITIALIZATION or PREPARATION - The preparation or


initialization of memory space for data processing. Represents the process that will
change the direction of initialization of any value or the execution of a variable.
ARROW or FLOW DIRECTION INDICATOR - Defines the logical sequence of the
program. It points to the next symbol to be performed. Indicates the flow of
direction or the next activity to be done.

ON-PAGE CONNECTOR - It connects to the flowchart to avoid spaghetti


connection on the same page. Indicates that the process is continued where the
matching on-page connector is placed.

OFF-PAGE CONNECTOR - It connects the flowchart on different page to avoid


spaghetti connection.

Guidelines for Preparing a Flowchart


1. Determine the following:
- Data to be entered.
- Information to produce
- The way the data will be entered.
- The point when data will be given.
- The point when information will be produced.

2. There should only be one Start/Begin and Stop/End process.


3. Concentrate on the logic of the program.
4. Choose only the important steps. No need to represent all the steps in the
flowchart.
Data Types, Variables and Constant
Data type - It is the type of the data being processed in the program.
- A classification of data that determines the values it may contain,
plus the operations that may be performed on it, and tells the
compiler or interpreter how the programmer intends to use the
data.
Classification of Data Types:

1. NUMERIC DATA - These types are used to perform mathematical


operations like Addition, Subtraction, etc.
1. NUMERIC DATA
a. Byte - This data type requires just one byte of memory. Variables
with data type Byte can store values from 0 to 255. The default byte
value is 0. Negative values and values greater than 255 are not
allowed. In case you attempt to assign invalid values, an Overflow
error will be returned.
b. Integer / Short Integer- These data types are used to store the
whole integer value. This occupies 2 bytes of memory. An integer is
one of the frequently used data types. They accept both positive
values, negative values, and zero as well. They have a range
between -32,768 to 32,767.
c. Long - This is an alternative to an integer data type which also
stores a whole integer value. However, it occupies more memory
than an integer variable which is 4 bytes. It has a range of values
from -2,147,483,648 to 2,147,483,648
d. Decimal - This is an exact numeric data type that is used for its
precision. This data type contains the below range of values.
+/-79,228,162,514,264,337,593,543,950,335 with no decimal
point +/-7.9228162514264337593543950335 with 28 decimal
places to the right of the decimal. The smallest non-zero value
accepted is +/- 0.0000000000000000000000000001.
e. Single - The accepted range of values are: 3.402823E38 to
-1.401298E-45 for negative values 1.401298E-45 to 3.402823E38
for positive values.
f. Double - The accepted range of values are:
-1.79769313486231E308 to -4.94065645841247E-324 for
negative values 4.94065645841247E-324 to
1.79769313486232E308 for positive values
g. Currency - These are useful for monetary calculations. The
currency data type can store both positive and negative values.
These can store 15 digits to the left of the decimal and 4 digits to
the right. Allowed range is -922,337,203,685,477.5808 to
922,337,203,685,477.5807

2. NON-NUMERIC DATA - These are data that can’t be manipulated by


arithmetic operators.
a. Boolean - This data type requires 2 bytes of memory and can store
only 2 values i.e. TRUE or FALSE. In other words, the Boolean
variable can only get value either TRUE or FALSE, alternatively 1 or
0 respectively. The default value of a Boolean variable is False.
b. Date - This data type is used to represent the date and time. It has
date range values from Jan 1, 0100 to December 31, 9999, and time
values from 0:00:00 to 23:59:59 and occupies 8 bytes of storage
size.
c. String - This data type is used to store string value. The string is
defined as a sequence of characters. There are 2 types of String
data type.
1. Variable-length String: This type occupies 10 bytes of storage
size plus the memory required for the string that is the string
length. They have a range value from 0 to approximately 2
billion.
2. Fixed-length String: It occupies the memory equal to the
length of the string itself. It can range from 1 to approximately
65,400 characters

d. Object - Any reference (used for pictures and images).


e. Variant - This is the universal data type, it can accept any kind of
data numeric and non-numeric. Variant data type gives more
flexibility while working with data. Variant data type uses more
storage size than any other data type. If you don’t mention a data
type, it will treat that as a Variant variable.

VARIABLES

- It is the primary storage location that can assume different numeric


or alphanumeric values. It is also a memory space allocated by a
computer user for processing and storing data.
- A variable is a named area in the memory, which holds temporary
data.
- A program can handle many data.
- A variable allocates a portion of the memory depending on the kind
of data.
RULES IN NAMING A VARIABLE

1. It must begin with a letter or an alphabet and may be followed by


combinations of alphanumeric characters.
2. There should be no special character like @, &, $, # and period (.).
3. It must be unique. You can't repeat names within the same level of
scope. For example, you can't declare two variables named age
within the same procedure. However, you can declare a private
variable named age and a procedure-level variable named age
within the same module.
4. The name of the variable should be indicative of the value it holds.
5. Avoid using confusing letters and numbers such as Zero and letter
O.
6. Use underscore _ in replacement of space.
7. Lessen the number of characters of your variable. The shorter the
variable, the better and more efficient the program will be so
Variable names can’t exceed 256 characters in length .
8. In most cases, uppercase and lowercase letters are read differently.
A and a may hold different data.
9. Variable names must not be a reserved word. Generally, you
shouldn't use any names that are the same as the function,
statement, method, and intrinsic constant names used in any host
application

CONSTANT
- Constant are values that do not change during the execution of the
program.
Operators and Expressions
Operators
- These are symbols that indicate the operation to be performed.
Classification of Operators
I. ARITHMETIC OPERATORS
These are used to perform mathematical calculations.

I. ARITHMETIC OPERATORS (continuation)

Expressions
- In computer science, an expression is a syntactic entity in a programming
language that may be evaluated to determine its value. It is a combination of
one or more constants, variables, functions, and operators that the
programming language interprets (according to its particular rules of
precedence and of association) and computes to produce ("to return", in a
stateful environment) another value. This process, for mathematical
expressions, is called evaluation.
Order of Precedence
- Also called as “order of operations” or “operator of precedence”, is a set of
rules specifying which procedures should be performed first in a
mathematical expression
Constructive and Destructive variables

Destructive Variables
- variable that destroys or change its value after processing. This
type of variable is normally the temporary storage of data during
processing.

Constructive Variables
- variable that maintains its value after being used in the process.

Example:
Question: Suppose that we have variables A and B and the values of A
and B are 5 and 10 respectively. What will happen if we have an
instruction of A = B? What is now the value of A? What is the value of A
and B after performing the instruction? Who gets what data?
- Variable A has now the same value with variable B, 10, and the
original data of variable A, 5 was destroyed. This is what we mean
by destructive and constructive variables. Variable A is the
destructive variable and Variable B is the constructive variable.
- As a rule, the manner of transferring data from one variable to
another is always from right to left.

You might also like