Module 1 - Intro To Computer System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

MODULE 1

INTRODUCTION TO
COMPUTER SYSTEM
AND PROGRAMMING
COMPROG – COMPUTER PROGRAMMING
TOPICS
• Computer System

• System Development

• Flowcharting and Pseudo Coding

• Programming Concepts
Computer System
•A system of integrated digital devices
(components) used to manipulate and
store data.

• It
has the ability to receive user input, process
data, and with the processed data, create
information for storage and/or output.
Computer System
• Data : Data is a raw material
of information.
• Information: Proper
collection of the data is
called information.
• Information Processing
System
• Information Technology
Computer System
• Components of Computer System

Hardware User

Data
Software
Computer System
• HARDWARE is the tangible part of a computer
system

✓ Input Devices
✓ Output Devices
✓ Process Devices
✓ Storage Devices
Computer System
• SOFTWARE is a set of instructions or processes
that the computer systems will perform.
✓ ApplicationSoftware - a comprehensive, self-contained program
that performs a particular function directly for the user

✓Operating System – manages all the other programs in a


computer, provides graphical user interface (GUI), handles system
set-ups/settings and performs process scheduling
Computer System
APPLICATION SOFTWARE OPERATING SYSTEM
Computer System
• USERS
• refers to the people who use and operate the
computer system, write computer programs
and design the information system
• Front-End Users/Back-End Users

• DATA
• Refers to the raw facts
Computer System
• Computer System Architecture and Organization

INPUT PROCESS OUTPUT

STORAGE PROGRAMMING
Computer System
Computer System
Computer System
System Development
• Involves a large-scale effort to either create
an entirely new Information System or
update an existing information system

1. PLANNING
2. ANALYSIS
3. DESIGN
4. IMPLEMENTATION
SYSTEM DEVELOPMENT
(Planning, Analysis and Design)
• Algorithm
•a set of instructions designed to perform a
specific task
• list of processes to solve a problem

Example:
- Solve the area of a triangle
- Convert Celsius to Fahrenheit
SYSTEM DEVELOPMENT
(Planning, Analysis and Design)
• Flowcharting
•a visual representation of an algorithm
• Used in designing and documenting simple
processes and computer programs

Advantages:
- Communication - Documentation
- Effective Analysis - Efficient Coding
SYSTEM DEVELOPMENT
(Planning, Analysis
and Design)
• Flowcharting
SYSTEM DEVELOPMENT
(Planning, Analysis and Design)
• Flowcharting common symbols
TERMINAL
PREDEFINED
PROCESS
FLOW LINES
DECLARE
INPUT/OUTPUT

PROCESS
CONNECTOR
LOOP
A OFF-PAGE
DECISION
• Flowcharting Data types

•Boolean → TRUE or FALSE


•Real → 3.1614
• Integer → 10
•String → “Hello”
• Flowcharting Operation
• Flowcharting Operation
• Add two numbers A

B
START
OUTPUT
“Enter 1st Number”

SUM = X + Y
Integer X
INPUT X

OUTPUT SUM
Integer Y OUTPUT
“Enter 2nd Number”

END
Integer SUM
INPUT Y

A B
EXAMPLE:
Reads the length and the
width of the rectangle.
Compute and display the
Area and Perimeter of the
rectangle.
EXAMPLE:
Inputs the base and the
height of the right triangle.
Calculate and display the
hypotenuse and the Area
of the right triangle.
Exercise:
1. Draw a flowchart that inputs the height and base of
a triangle. Compute and display the area of
triangle.
AreaT = 1/ 2(base x Height)
2. One end of a foot ruler is placed against a vertical
wall, the other end of the ruler reaches a point on
the floor 9 inches from the base of the wall. Find the
sine, cosine, and tangent of the angle that the ruler
makes with the floor.
SEATWORK
1. Draw a flowchart that inputs the values for the 3
resistors and the voltage source of the series circuit as
shown below. Compute and display the total current in
the circuit. The relationship for the total current is:

IT = VS / ( R1 + R2 + R3 )
CONDITIONAL (BRANCHING)

- Used to cause certain actions within a


program if a certain condition is met

- An If Statement checks the condition and


executes a true or false branch based on
the result of the condition
• CHECK IF A NUMBER IS ODD OR EVEN
A
START

NO
X%2=0 OUTPUT
Integer X “ODD”

OUTPUT
YES
“Enter a Number”
OUTPUT
“EVEN”

INPUT X

A
END
EXAMPLE:
Design a flowchart that
selects the larger of two
inputted values. Assume
that the two numbers are
not equal.
EXAMPLE:
Create a flowchart that
inputs the salary of an
employee. If the salary is less
than 10,000.00, then
compute the bonus which is
25% of the salary, otherwise
bonus is fixed at P4,000.
EXAMPLE:
In temperature countries like Japan, there are 4 seasons.
January to March (1 - 3) is Winter
April to June (4 - 6) is Spring
July to September (6 – 9) is Summer,
and October to December (10 - 12) is Autumn.

Draw a flowchart that allows the user to input month (in


integer format). Display the season associated with that
month.
EXAMPLE:
Exercise:
1. Input length and width of a rectangle from the user.
Calculate and output the area. If the length and width are
equal, output a message indicating that the “figure is a
square”.

2. Input a temperature in degrees Fahrenheit from the user.


If the temperature is 80 degrees or more display the
message “Go play golf” otherwise, if the temperature is 70 -
79 degrees display the message “Put on a jacket”,
otherwise display the message “It is way too cold.”
SEATWORK:
Draw a flowchart that inputs the user’s age. Display the
name of his/her favorite snack according to the ff. age
group:
REPETITION (LOOPING)

- Used for operations that are repeated for some


number of times.

- Loop repeats until some specified condition at


the beginning or end of the loop is met.

• Looping blocks:
– For block
– While block
– Do block
• Display “HELLO” 5 times (FOR BLOCK)
START

Integer
counter

NEXT OUTPUT
counter = 1 to 4 “Hello”

DONE
END
• Display “HELLO” 5 times (WHILE BLOCK)
START

counter =
Integer counter + 1
counter

YES
OUTPUT
counter = 1 counter <= 5
“Hello”

NO
END
• Display “HELLO” 5 times (DO BLOCK)
START

Integer
counter

OUTPUT counter =
counter = 1 “Hello” counter + 1

NO
YES
counter < 5

END
EXAMPLE:
Draw a flowchart that will
compute and display the
sum of numbers from 1 to 10.
EXAMPLE:
Draw a flowchart that will
compute and display the
average of 5 exam scores
entered by the user.
Exercise:
1. Draw a flowchart that computes the squares and
cubes of the integers from 1 to 10 .

2. Make a flowchart that computes and displays the


distance a body falls in feet per second, for the first 5
seconds of free fall as given by the equation:

S = ½ at 2
where: S = the distance in feet
a = acceleration due to gravity (32 ft/sec 2 )
t = time in seconds
Exercise:
1. Draw a flowchart that computes the squares and
cubes of the integers from 1 to 10 .

2. Make a flowchart that computes and displays the


distance a body falls in feet per second, for the first 5
seconds of free fall as given by the equation:

S = ½ at 2
where: S = the distance in feet
a = acceleration due to gravity (32 ft/sec 2 )
t = time in seconds
SYSTEM DEVELOPMENT
(Implementation)
•Coding
• Programming

• Computer Language
• used to create computer programs
• Syntax and rules
END OF PRESENTATION

You might also like