Professional Documents
Culture Documents
Computer
Programming
Quarter II – Module 4:
COMPONENTS OF A COMPUTER PROGRAM
Republic Act 8293, section 176 states that: No copyright shall subsist in
any work of the Government of the Philippines. However, prior approval of the
government agency or office wherein the work is created shall be necessary for
exploitation of such work for profit. Such agency or office may, among other things,
impose as a condition the payment of royalties.
Each SLM is composed of different parts. Each part shall guide you step-by-
step as you discover and understand the lesson prepared for you.
At the end of each module, you need to answer the test to self-check your
learning. Answer keys are provided for each activity and test. We trust that you will
be honest in using these.
In addition to the material in the main text, Notes to the Teacher are also
provided to our facilitators and parents for strategies and reminders on how they
can best help you on your home-based learning.
Please use this module with care. Do not put unnecessary marks on any
part of this SLM. Use a separate sheet of paper in answering the exercises and
tests. And read the instructions carefully before performing each task.
If you have any questions in using this SLM or any difficulty in answering
the tasks in this module, do not hesitate to consult your teacher or facilitator.
Thank you.
ii
For the learner:
The hand is one of the most symbolized part of the human body. It is often used to
depict skill, action, and purpose. Through our hands we may learn, create, and
accomplish. Hence, the hand in this learning resource signifies that you as a
learner is capable and empowered to successfully achieve the relevant
competencies and skills at your own pace and time. Your academic success lies in
your own hands!
This module was designed to provide you with fun and meaningful opportunities
for guided and independent learning at your own pace and time. You will be
enabled to process the contents of the learning resource while being an active
learner.
iii
about the lessons.
1. Use the module with care. Do not put unnecessary mark/s on any part of
the module. Use a separate sheet of paper in answering the exercises.
2. Read the instruction carefully before doing each task.
3. Observe honesty and integrity in doing the tasks and checking your
answers.
4. Finish the task at hand before proceeding to the next.
5. Return this module to your teacher/facilitator once you are through with it.
If you encounter any difficulty in answering the tasks in this module, do not
hesitate to consult your teacher or facilitator. Always bear in mind that you are
not alone.
We hope that through this material, you will experience meaningful learning
and gain deep understanding of the relevant competencies. You can do it!
iv
v
Explore
Introduction:
This user friendly module will guide in your learning & understanding of the
different parts of a Computer Program. The module will permit you use your
different learning in diverse programming languages. We used the language that is
appropriate for your grade level. The lessons were designed to follow the standard
SLM format.
Have you ever wondered about the ever-growing world? Have you been
fascinated by the massive field of Technology? This introductory module will give
you insights in the diversities in the field of the different parts and components of
computer software. We will explore the different paradigms in Software
Development and engage you to concepts that will enable you to study, utilize and
master any programming language you will like in the future.
Pre – Assessment:
You will be challenged to dig deeper into your prior knowledge and previous
experiences about parts of computer program. This Phase will guide you in
assessing yourself by answering questions for you to further explore the basics of
computer programming.
TEST II. DIRECTION: Fill in the graphic organizers with word synonymous or
associated with Computer Programs.
COMPUTER
PROGRAMS
In your previous lesson, we studied about character and string data type.
The character data type represents individual or single characters.
Characters comprise a variety of symbols such as the alphabet, the numeral
digits, punctuation, etc. On the other hand, string data type is traditionally a
sequence of characters, either as a literal constant or as variable. When we use
strings in programs, we need to enclose the string between quote marks (“....”).
Now we are going to study about Components of Computer Program.
Direction: Using the given image as clue, arrange the following group of letters to
form a computer programming word.
EARDHE
NOOERATIP
TUNPI
MAPGROR
CEDINIOS
3. Data definitions
These are definitions of the data proposed to be used during the program
execution. Each definition results in the allocation of RAM as required. This is
done by specifying the size and type of values that can be stored in an identifier or
variable.
4. Input operations
These operations bring in data from the outside world into the RAM for
processing. Input or scanner functions of a programming language are used to
take input from the user.
5. Output operations
These operations deliver the processed information to the outside world
using the print functions of a programming language.
6. Computational operations
These operations perform mathematical operations and produce results.
8. Program documentation:
These statements explain the logic of the program statements, which assist
other programmers in maintaining the program. Comments can be used to explain
the parts of a programming code.
9. System calls
These operations call the services provided by the operating system and
utilize them in the program. System calls can be in a form of process control, file
management, device management, information maintenance and communication.
Sample Java program that automatically add two numbers from the user
Practice 1
Practice 2
2. Did you notice any sequence in the components of computer programs or they
just can come from just anywhere in the program. Support your answer.
Assess
Multiple Choice. Choose the letter of the best answer. Write the chosen letter on a
separate sheet of paper.
A. I & II
B. III & IV
C. II & III
D. I & IV
A. II & III
B. I & III
C. II & IV
D. III & IV
Fill in the blanks. Direction: Complete the sentence, you may choose a word given
inside the box.
RAM Input operations Decision making operations logic
execution header computational operation flow
9. Program beginning and ending contain specific sets of actions to be formed when
the program begins _________________ and ends the program.
10. Input operations bring in data from the outside world into the _______ for
processing.
11-15. On the left of the side of the table below are some of the components
of a program. Write the correct sequence of the components on the right side
of the table.
Documentation 12.
Header 13.
1. What is the most important thing you learn from this module?
2. What do you want to learn more about components of computer program?
3. Where did you encounter difficulties in this module, and what did you do to deal
with it?
Assess
1. B
2. D LEARN Pre-Assessment
3. B
4. D 1. HEADER Test I.
5. A 2. OPERATION
3. INPUT 1. B
6. Computation
4. PROGRAM 2. B
Operation
5. DECISION 3. B
7. Logic
4. A
8. Decision making
5. C
operations
9. execution
10. RAM Test II.
11. Header
12. Program Beginning Macro, Script, Agent, Trigger,
13. Data Definition Procedure, function, Applet,
14. Documentation Servlet, App, Bot and
15. Program Ending
Routine
2017. https://pixabay.com/illustrations/idea-icon-bulb-creativity-set-2558678/.