You are on page 1of 9

What is Technology?

Process by which a human modifies the nature to meet its needs and wants of man

Behind the scene


-

Is driven by a computer program to implement actions and process that are happening
before a technology response takes place

Computer System component


INPUT

PROCESS

OUTPUT

The Blue Print


-

Is the logic ideas transformed into a map of how computer should do things it is
implemented through software and executed through the inter-action of different hardware
device

Flowchart
-

Is a diagram representing the logical sequence in w/c a combination of steps or operations


is to be performed, It consist of labeled geometrical symbols that are inter-connected to
program a pictorial representation of data processing procedure

2 Major use of flowchart

In Programming
Documentation

The use of programmer in Flowcharting


1.
2.
3.
4.

Marshall and organize his facts on paper


Outline problem logic and solutions
Deal systematically with the problem as a whole
Build step by step his own reference documentation and reminders

2 types of flowchart

Program Flowchart describes graphically in detail the logic operations and steps with in a
program and the sequence in which these steps are to be executed for the transformation
of data to produce the needed output
System Flowchart is a graphic representation of the procedures involved in converting
data on other data in output form

Basic Flowchart Symbols


Name

Shape
Lozenge

Terminal

Initialization

Hexagon

Input / Output

Parallelogram

Process

Rectangle

Flow lines

Directional Arrows

On Page connector

Circle

Symbol

Off Page Connector

Decision

Diamond

6 Relational Operators
>

greater than

<

less than

equal to

<=

less than or equal to

>=

greater than or equal to

Description
Defines the starting
and ending point of a
flowchart
The preparation and
initialization of
memory space data
for processing
The Inputting of data
for processing and
printing out
processed data
Manipulating of data
and mathematical
computations
Defines the logical
and sequence of the
program. It points for
the next symbol to be
performed
Connects to the
flowchart to avoid
spaghetti connection
on the same page
Connects to the
flowchart on different
page to avoid
spaghetti connection
Process conditions
using relational
operators. Used for
trapping and filtering
data

not equal to

Element of Flowchart
1.
2.
3.
4.

2 types of Values
2 types of data
Data types
Processing data

2 types of values

Constant
Variable

A type of Value that is fixed of does not change


A type of value that Changes

4 Data Values
Character constant

- combination of characters that doesnt change

Character variable

- combination of characters that change (Ex. Name address)

Numeric constant

- numeric in value that doesnt change

Numeric variable

- numeric in number but it change (Ex. Age, Telephone number)

2 types of Data
Character

- consist of Alphanumeric Characters

Numeric

- numbers

Data Types
1. String
- consist of combination of alphanumeric characters and can be
represented with ( )
2. Integer
- Whole Number
3. Float
-number with decimals but decimal places are in short range
4. Double
-consist of number with decimals but with wider range, it is more
accurate the float
5. Boolean
- a type of data that is answerable by Yes or No, True and False
Hierarchy of Arithmetic Operation
Parentheses

()

Exponentiation

Multiplication

Division

Addition

Subtraction

2 types of variable
1. Destructive variable
2. Constructive Variable
process.

- variables that destroy or change its value after processing.


- variable that maintains the destructive variable after used in

Example.
Destructive variable

A = 22

Constructive Variable

(Destructive variable absorbs the value of Constructive variable after processing)


Problem:
1. Variable A has a value of 5 and variable B has a value of 10, what will happen if we have
an instruction of A= B?
What are the now the values of A and B?
2. A= 4, B=6, C=5, D= 10
If A=B; C=B what is the value of c?
If B= A;A=C;C=D what is the value of E if E = A+B+C?
If A=D and D=B what is the value of A?

(Flowcharting, Understanding the Programming Process)


Six Steps in Programming Process:
1.
2.
3.
4.

Understand the Problem


Plan the logic
Code the program
Translate the program into machine language
Interpreter
- interpret the data word by word or by codes
Compiler
- translates the data as a whole
5. Test the program
6. Put the program into production

Errors in Programming
1. Syntax Error
met.
2. Logical Errors
computation

occurs when there is a rule in programming language that is not


occurs when there is an error with the order of statement or

3 types of Control structures


1. Sequence
2. Selection/Decision
3. Looping (Repetition, Iterations)

The use of Camel Casing


- the convention of writing a variable name consisting of multiple words with the first letter of the
word starts in lower case followed by the first letter of the following words in Upper case
Example:
o
o
o
o

myFirstName
myLastName
myHomeAddress
dateOfBirth

Declaration/Initialization
<Data Types> <Variable Name> [=Constant Value]

Data Types

Declare Data types

Integer

int

String

String

Character

char

Double

double

Float

float

Boolean

boolean

3.14151619201023 (double precision)

3.142345 (single precision)

Example:
int employeeNumber = 69
string employeeName = Pedro

Input, Process and Output Application


Input and Output Symbols It is the part of the program that the user see as and get to
accept a data from the use to send to the computer for processing
Input Get or accept the data from the user keyword, to get an input
Get variableName

Example.

Star
t
int firstNum
=0
Input
firstNum
Stop

Ask user for variable Name OR


Input variableName

Output - the instruction defines when and where t o release data

Print variableName

Print variableName1, variable


OR
Name2

Process it is the only are in the program where all arithmetic operation and computations
takes place

Example:
Variable1 +
Variable 2
Learning Process:
1.
2.
3.
4.

Create a flowchart that will accept two integers and print the inputted numbers
Accept the two numbers and print the sum
Accept three numbers and print the product of the numbers
Accept the value for radius and compute and print for the area of the circle where the
formula of area is

A= r

the value of pi = 3.1416

5. Accept a temperature value in Celsius and print its equivalent temperature in Fahrenheit.
The formula for converting Celsius to Fahrenheit is F=9/5 ( C ) + 32 where c is the
temperature i n Celsius

Selection and Decision control Structure

Decision application in Flowcharting is implemented using a decision symbol. It is the sole


symbol in flowcharting that has the ability to perform relational operations that can filter
conditions to arrive at a decision. It has a single input and 2 output choices characteristic. The
two output characteristic of the symbol is filtering stage of a program that determines if the set
of condition in the decision symbol is either true or false.
Condition use relational operators to complete the process
6 Relational Operators
>

greater than

<

less than

equal to

<=

less than or equal to

>=

greater than or equal to

<>

not equal to

Two types of decision application


Single Alternative

Multiple/Dual Alternative

Example Problem:
1. Given A = 2 ; B = 4; C = 0
Compare the value of variable A and B If the value of variable A is greater than the value
of variable (Stop), Otherwise, add the variable A to the value of variable B and store the
Sum to variable C.
2. Accept 2 unique integers and print the higher integer.
3. Accept two unique integers. If the integers are equal print the sum of the integers,
otherwise print the product.
4. Input integers for A,B and C and print the highest number.
5. Accept two integers and determine if the values are equal. If the values are equal don not
print anything otherwise print the highest number

6. Accept a real estate value and compute for the real estate tax that will meet the following
conditions
a. If the value of the real estate is less than 250,000 tax is computed at 5% of the real
estate value.
b. If the value of the real estate is between 250,000 and 500,000, tax is computed at 10%
of the real estate value.
c. If the value of the real estate is more than 500,000 tax is computed at 15% of the real
estate value
7. Input 3 unique numbers and arrange the numbers in lowest to highest order.
8. Input 4 unique numbers and arrange the number in highest to lowest order.

You might also like