Technical Vocational Livelihood: Computer Programming

You might also like

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

Technical

Vocational
Livelihood
QUARTER

Computer Programming

TECHNICAL VOCATIONAL LIVELIHOOD


Computer Programming (ICT) – Grade 11
Quarter 1 – Module 1: Interaction of the Objects and Interaction Diagrams
First Edition, 2020

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.

Borrowed materials (i.e., songs, stories, poems, pictures, photos, brand


names, trademarks, etc.) included in this module are owned by their respective
copyright holders. Every effort has been exerted to locate and seek permission to use
these materials from their respective copyright owners. The publisher and authors
do not represent nor claim ownership over them.

Published by the Department of Education Division of Pasig City

Development Team of the Module


Writer: Jenessy Joy T. Pinga
Editors: Lerma Cantanero
Reviewers: Rowena O. Dimagiba
Illustrator:
Layout Artist:
Management Team: Ma. Evalou Concepcion A. Agustin
OIC-Schools Division Superintendent
Aurelio G. Alfonso EdD
OIC-Assistant Schools Division Superintendent
Victor M. Javeña EdD
Chief, School Governance and Operations Division and
OIC-Chief, Curriculum Implementation Division

Education Program Supervisors

Librada L. Agon EdD (EPP/TLE/TVL/TVE)


Liza A. Alvarez (Science/STEM/SSP)
Bernard R. Balitao (AP/HUMSS)
Joselito E. Calios (English/SPFL/GAS)
Norlyn D. Conde EdD (MAPEH/SPA/SPS/HOPE/A&D/Sports)
Wilma Q. Del Rosario (LRMS/ADM)
Ma. Teresita E. Herrera EdD (Filipino/GAS/Piling Larang)
Perlita M. Ignacio PhD (EsP)
Dulce O. Santos PhD (Kindergarten/MTB-MLE)
Teresita P. Tagulao EdD (Mathematics/ABM)

Printed in the Philippines by Department of Education – Schools Division of


Pasig City
Computer
Programming

QUARTER 1

Interaction of the Objects


and Interaction Diagrams
Introductory Message

For the facilitator:

Welcome to the Computer Programming for the ICT Module on Interaction of the
Objects and Interaction Diagrams!

This module was collaboratively designed, developed and reviewed by educators from
Schools Division Office of Pasig City headed by its Officer-In-Charge Schools Division
Superintendent, Ma. Evalou Concepcion A. Agustin in partnership with the Local
Government of Pasig through its mayor, Honorable Victor Ma. Regis N. Sotto.
The writers utilized the standards set by the K to 12 Curriculum using the Most
Essential Learning Competencies (MELC) while overcoming their personal, social,
and economic constraints in schooling.
This learning material hopes to engage the learners into guided and independent
learning activities at their own pace and time. Further, this also aims to help learners
acquire the needed 21st century skills especially the 5 Cs namely: Communication,
Collaboration, Creativity, Critical Thinking and Character while taking into
consideration their needs and circumstances.

In addition to the material in the main text, you will also see this box in the body of
the module:

Notes to the Teacher


This contains helpful tips or strategies that
will help you in guiding the learners.

As a facilitator you are expected to orient the learners on how to use this module.
You also need to keep track of the learners' progress while allowing them to manage
their own learning. Moreover, you are expected to encourage and assist the learners
as they do the tasks included in the module.
For the learner:

Welcome to the Computer Programming for the ICT Module on Interaction of the
Objects and Interaction Diagrams!

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 material while being an active learner.

This module has the following parts and corresponding icons:

Expectations - These are what you will be able to know after


completing the lessons in the module

Pretest - This will measure your prior knowledge and the


concepts to be mastered throughout the lesson.

Recap - This section will measure what learnings and skills


that you understand from the previous lesson.

Lesson- This section will discuss the topic for this module.

Activities - This is a set of activities you will perform.

Wrap-Up- This section summarizes the concepts and


applications of the lessons.

Valuing-this part will check the integration of values in the


learning competency.

Posttest - This will measure how much you have learned from
the entire module. Ito po ang parts ng module.
EXPECTATIONS

At the end of this module you will understand the following:

1. identify basic computer parts;


2. understand the function of basic computer parts and components;
3. understand algorithm and pseudocode; and
4. use algorithm, pseudocode and flowchart in solving a problem.

PRETEST

Directions: Select the letter that corresponds to the correct answer.

1. Which of the following is an electronic, programmable device that can store,


retrieve and process data.?
A. Computer B. Machine C. Monitor D. System Unit
2. Which of the following unit is used for storing data and instructions?
A. Input B. Processing C. Output D. Storage
3. Which of the following is a graphical representation of the logical sequence of
steps to be process of a program?
A. Flowchart B. Algorithm C. Pseudocode D. Diagram
4. Which of the following symbols shows an action in the process?
A. B. C. D.

5. Which of the following symbols identifies key inputs or outputs of a process?


A. B. C. D.

RECAP

The .Net is a framework that can be used to create Form based and Web
based applications. The framework also supports various programming languages.
Developers can choose and select language to develop the required application.
LESSON

Basic Computer Parts and Concepts


Computer is an electronic programmable device that can store, retrieve and
process data. Computer includes peopleware, hardware and software. Peopleware
refers to the user that manipulates the computer. Computer hardware refers to all
the devices in the computer or anything that can be touched by the peopleware.
Computer software is anything that cannot be touched by the peopleware; it refers
to all the programs and application in the computer. There are two types of computer
software, the System Software and the Application Software. System Software is the
most important software because without this software all applications will not run.
Under System Software is Operating System. It is the main program of your computer
even your cellphones; examples are Windows OS, Linux and Mac OS. Application
Software it is the common type of software, it accomplishes a specific task. Examples
of Application Software are Photoshop and Microsoft office.

There are five basic parts of computer, these are monitor, keyboard, mouse,
system unit and AVR, yet, computer may still work even without AVR.

https://www.bhphotovideo.com/c/product/1485490-REG/dell_24_u2419hx_ultrasharp_wqhd.html

Monitor – it is an output device that displays information.

https://www.google.com/search?q=keyboard&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjv2-
jvuorqAhWFIqYKHYx0DO0Q_AUoAXoECA0QAw&biw=1366&bih=657#imgrc=fx7TZ31vazq7LM
Keyboard – it is an input device used to enter function using keys or button.
It is primarily a device which is used to input special characters, numbers and
letters.

https://www.google.com/search?q=mouse&tbm=isch&chips=q:mouse,g_1:computer:eAutwydHe_I%3D&usg=AI4_-
kSYPSrXAmz2mPI10bgQ27VNB-XNDQ&sa=X&ved=2ahUKEwjOreWrwYrqAhUQxYsBHb8tAVMQgIoDKAF6BAgHEAY#imgrc=YTlipZJcHTmN-M

Mouse – it enables the user to control or move the cursor. It is used for
selecting, dragging, hovering and clicking.

https://www.google.com/search?q=system+unit&source=lnms&tbm=isch&sa=X&ved=2ahUKEwikwefNwYrqAhUYBZQKHT3YAfIQ_AUoAXoE
CBgQAw&biw=1366&bih=657#imgrc=rLY8m1iZVDydiM&imgdii=q8IqguY38xKVZM

System unit – it is known as computer chassis. It includes Motherboard,


Central Processing Unit (CPU), RAM, ROM, Power Supply and other main parts of
computer.

https://www.google.com/search?q=avr&source=lnms&tbm=isch&sa=X&ved=2ahUKEwigh-HHworqAhVMFqYKHdznB-
0Q_AUoAXoECA4QAw&biw=1366&bih=657#imgrc=12zA13lamIH3YM

Automatic Voltage Regulator (AVR) – it is used to maintain the voltage of a


computer or electronic device/s.

What does a computer do?


A computer performs four major operations. First, it accepts instructions or
data as input, second, the data will process as per instructions, third, it gives result
in the form of output and it stores and data.
In input operation user will enter data and computer will accept it, next is the
processing operation this is the time when the computer will process data entered
by the user, while processing the data is hold by the Random Access Memory (RAM)
and after processing it will hold by Read Only Memory (ROM). RAM is holding data
while computer is On, it is also call as volatile, then non-volatile is the ROM that can
hold data even the computer is On or Off. Next, is Output operation, showing the
result of the data and last storage operation, this time user can save data in any
storage devices.

Figure 1 shows how the process flows inside the computer.

Figure 1

Input

 It is used for entering data into the computer.


 It allows the user to interact.
 It accepts data.

Examples:

Keyboard, Mouse, Scanner, Camera

Processing

 The task of performing operations given by the user.


 It is called the brains of the computer.
 It carries out instructions.

Examples:

Central Processing Unit (CPU)


Output

 It is used for showing the result as output after processing.


 It allows the user to interact.
 It delivers data.

Examples:

Monitor, Printer, Speaker

Storage and Memory

 It is used for storing and handling data and instructions.

Examples:

Flash drive, Hard drive, CD, DVD, RAM (Random Access Memory),
ROM (Read Only Memory)

Computer Programming
There are three words that we need to understand, these are Program,
Programmer and Programming.

Program

 Set of instruction that tells the computer what to do.

Programmer

 Person who develops of a program or write a code.

Programming

 Process that came from an original formulation of a computing


problem to executable programs or simply a process of creating
application.

There are two ways of programming. Procedural and OOP (Object-Oriented


Programming). Procedural is a system contains of a series of computations steps to
be carried out while OOP is based in the concept of an object that will output
interactive design to the application and computer programs.

Process/Steps in programming
1. Analyze the problem or the program
- First you must know exactly what you will do. You must formulate a
clear statement of what is to be done.
2. Develop an algorithm.
- It is a sequence of effective statements that when applied to the
problem, will solve it.
3. Coding
- It is a process of translating the algorithm into high-level language or
simply coding means writing a code. In writing code make sure that the
program performed the way it is intended.
4. Testing and debugging
- Run the program and test the result, make sure that it is in a form you
intended if not produce a solution to your program.
5. Documentation
- The programmer must know how the program works, including
descriptions of it, the hardware and the software requirements.
6. Maintenance
- Programmer needs to keep the program running smoothly, provides
updates and solution or improvement in the program considering
changes in the field it is used.

Algorithm, Pseudocode and Flowchart


Algorithm

It is a step-by-step procedure or a set of rules in resolving problem or creating


programs. It also helps the programmer in identifying decision points. Using
algorithm can also determine easily the error in a particular process.

Example Problem: Computing the area of rectangle

Algorithm:

Start

Identify the length and width

Input length and width

Computing the Area

Print area of rectangle

End

Pseudocode

It is a shorter description of an algorithm. It is a combination of English and


code method to illustrate the algorithm.

Example Problem: Computing the area of rectangle

L= Length of the Rectangle

W= Width of the Rectangle

A= Area of the Rectangle


Pseudocode:

Begin

A=0 L=0 w=0

Enter L and W

L*W

Print A

Stop

Flowchart

It is also a description of an algorithm like pseudo code. The difference is that


the flowchart is a graphical representation of it. It also helps to identify easily the
potential improvement of a program.

Flowchart consists of eight standard symbols namely; Terminator,


Preparation, Process, Decision, Input/Output, Arrow or Direction Flow, On-page
Connector and off-page Connector.

Terminator –
signifies the beginning
and the end of the
process.
Preparation –
signifies the
automated
processing of
information.

Process – shows how a


process is being done.

Decision –
shows when
the decision
needs to be
made.
Input/Output –
identifies what to
input and signifies
the output.

Arrow or Direction flow –


indicates the direction and
order of the process.

On-page
Connector –
used to
connect the
flow on the
same page.

Off-page
Connector – used
to connect the
flow to another
page.

Example Problem1: Computing the area of rectangle.


L= Length of the Rectangle

W= Width of the Rectangle

A= Area of the Rectangle

Flowchart:

Example Problem2:
Finding the average of any three numbers. If the average is greater than or
equal to 90 print “very good”, else print “good”.

T = Sum of three number

X = Number 1

Y = Number 2

Z = Number 3

A = Average of three number

Flowchart:
ACTIVITIES

In short bond paper make an algorithm, pseudo code and flow chart based on
the given problem.
Problem:
Getting the age of participant, if the age is less than or equal to 17 you need
to print “sorry you’re not able to join the event”, else you need to print “welcome to
the event”.
Submit a soft copy/hard copy of your completed activity to your subject
teachers on the following meeting.
Rubrics:
Needs work Developing Meets Standard Score
Algorithm
10 15 20
Demonstrates
Demonstrates little
beginning
understanding of the Demonstrates full
understanding of the
concept being understanding of the
concept being
studied. concept being studied.
Concept studied.
Student cannot Student can explain
Student can partially
explain their their learning.
explain their
learning.
learning.
The flow is present
There is no logic to The flow is logical and
but there is a
the flow. The flow the directions help the
question as to which
Steps has no order and is reader to complete the
step goes in which
hard to understand. task.
order.

Pseudocode
Demonstrates
Demonstrates little
beginning
understanding of the Demonstrates full
understanding of the
concept being understanding of the
concept being
studied. concept being studied.
Concept studied.
Student cannot Student can explain
Student can partially
explain their their learning.
explain their
learning.
learning.
Pseudocode is very
Pseudocode is clear,
clear,
understandable, and
Pseudocode is understandable,
the code is organized
Readability difficult to readable, and
into steps, though
understand and is organized into
there may be a few
unorganized. as few steps necessary
extra steps.
as possible.
Flowchart
Demonstrates
Demonstrates little
beginning
understanding of the Demonstrates full
understanding of the
concept being understanding of the
concept being
studied. concept being studied.
Concept studied.
Student cannot Student can explain
Student can partially
explain their their learning.
explain their
learning.
learning.
Some of the symbols All symbols are
Symbols are not
Symbols are not correct. correct.
correct.

The flow is present


There is no logic to The flow is logical and
but there is a
the flow. The flow the directions help the
question as to which
Steps has no order and is reader to complete the
step goes in which
hard to understand. task.
order.

Total /140
WRAP–UP

This module discussed the five basic parts and concepts of computer,
introduction to programming, flowchart, algorithm and pseudocode.

As learners, can you discuss the following items based on how you understand
the topic, use your own words to describe it.

1. Computer’s five basic parts.


2. Computer four major operations.
3. Process/Steps in programming.

Also, do you think that understanding algorithm, pseudocode and making


flowchart of your program is important to learn computer programming in a holistic
way?

Use the space bellow to answer the questions mentioned above.

___________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________

VALUING

Directions: Read and answer the following questions carefully in two to three
sentences each number.

1. What do you think are the importance of learning the Algorithm, Pseudocode
and Flowchart?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
2. How will you use the knowledge you acquired about steps in programming?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
3. Cite a situation in which you can apply the knowledge of understanding in
the components and parts of computer?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

POSTTEST

Directions: Circle the letter that corresponds to the correct answer.

1. It is a graphical representation of the logical sequence of steps to be


process of a program.
A. Flowchart B. Algorithm C. Pseudocode D. Diagram
2. Process in programming which translating the algorithm into high-level
language.
A. Planning B. Coding C. Documentation D. Maintenance
3. One of the major operations of computer used for entering data into the
computer by the user.
A. Input B. Processing C. Output D. Storage
4. It is a set of instructions that tells the computer what to do.
A. Application B. Program C. Programmer D. Programming
5. In flowchart, it signifies the beginning and the end of the process.
A. Off-page B. Decision C. Terminator D. Input/Output
KEY TO CORRECTION

5. C D 5.
4. B A 4.
3. A A 3.
2. B D 2.
1. A A 1.

Post-test: Pre-test:

References
 Computer Programming Volume I, Innovative Training Works, INC
 Computer Programming Volume II, Innovative Training Works, INC
 Accessed June 22, 2020 10:00Am
https://homepage.cs.uri.edu/faculty/wolfe/book/Readings/Reading13.htm
 Accessed June 22, 2020 11:00Am
https://edu.gcfglobal.org/en/computerbasics/basic-parts-of-a-computer/1/
 Accessed June 22, 2020 11:30Am
https://www.explainthatstuff.com/howcomputerswork.html

You might also like