Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

TVL Comprog11-Q3-M2

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

7

Technical Vocational
Livelihood
QUARTER

3 Computer Programming

Computer Programming (ICT) – Grade 11


TECHNICAL VOCATIONAL LIVELIHOOD
Quarter 3 – Module 2 Elements and Fundamentals of Programming 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
Assistant Schools Division Superintendent
OIC-Schools Division Superintendent
Aurelio G. Alfonso, Ed. D.
OIC-Assistant Schools Division Superintendent
Victor M. Javena, Ed. D.
OIC – Chief Curriculum Implementation Division
Chef School Governance and Operation Division

Education Program Supervisor


Wilma Q. Del Rosario, LRMDS
Dr. Libranda L. Agon, Ed. D., EPP/TLE

Printed in the Philippines by ________________________

Department of Education – Division of Pasig City

Office Address: Caruncho Avenue, San Nicolas, Pasig City


Telefax: 641-88-85 / 682-2819
E-mail Address: divisionofpasig@gmail.com
Computer
Programming

Quarter 3
Self Learning Module 2
Elements and Fundamentals
of Programming
Writer: Jenessy Joy T. Pinga
Editors: Lerma Cantanero
Reviewers: Rowena O. Dimagiba
Introductory Message

For the facilitator:

Welcome to the Computer Programming for the ICT Module on Elements and
Fundamentals of Programming!

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 Elements and
Fundamentals of Programming!

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:

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


completing the lessons in the module

Pre-test - 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.

Post-test - This will measure how much you have learned from
the entire module. Ito po ang parts ng module.
EXPECTATION

The students should be able to:

• understand Elements and Fundamentals of Programming.


• familiarize Elements and Fundamentals of Programming.
• cite the importance of visual basic in programming.

PRE–TEST

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

1. _________________ determines whether a process is met or not.


A. class
B. loops
C. programming
D. conditional

2. It executes a group of commands repeatedly.


A. class
B. loops
C. programming
D. conditional

3. A collection of various data members (fields, properties, etc.).


A. class
B. loops
C. programming
D. conditional

4. The predefined set of reserved words that have special meaning for the
compiler.
A. variables
B. keywords
C. data type
D. comment

5. It can be integers, string, float and etc.


A. variables
B. keywords
C. data type
D. comment
RECAP
Module 1 discussed what is visual basic and the IDE of start page, now
describe the following below on how you understand the lesson.

• Visual Basic
• Start section
• Recent section
• Getting Started section
• Announcement section
• Solution Explorer section

LESSON

Elements and Fundamentals of Programming!


Programming is the act of instructing computers to carry out tasks. It is often
referred to as coding.

Computers have their language like humans. Computers do not understand


the human language. The language of computers is the binary code 1 and 0. To
communicate with machines who speak binary, we do so in a language that’s closer
to our own natural language. Programming languages are close to our natural
languages. But they are more structured and must be thoroughly learned.

The computer needs a way to understand our human language. To do this,


we’ll need a translator.

Source code refers to code written in a particular programming language.


Translators have the responsibility of converting your source code to the machine
language.

The process will be from source code to translator to binary which shows the
program.

Now we are going to use visual basic as our language in coding, but before we
begin in creating programs, we should be familiar with the following terms:

Projects – A collection of files that can be compiled to create a distributable


component (program). There are many types of projects, and comple applications
might consist of multiple projects, such as Windows application projects and
support dynamic link library (DLL) projects.
Solution – A collection of projects and files that make up an application or
component.
Variables it represents storage locations and each variable will have a
particular data type to determine the type of values the variable can hold.
Syntax for variables declaration : Dim Variable_Name As Data Type = value
Data Types are useful to define a type of data the variable can hold such as
integer, float, string, etc. in application.
Keywords the predefined set of reserved words that have special meaning for
the compiler. So the keywords cannot be used as identifiers such as variable
name, class name, etc. in applications.
Operator is a programming element that specifies what kind of operation
needs to perform on operands or variables.
Comments are the self-explanatory notes to provide detailed information
about the code which we wrote in our applications. By using comment symbol ('),
we can comment on the code in our Visual Basic programming. The comment
symbol (') will tell the Visual Basic compiler to ignore the text following it, or the
comment.
Statements - Contain instructions hat tell what a program does. Statements
can be expressions, assignment, or call functions.
Conditional – Determine whether a process is met or not. Conditions are
expressions that compare two values and determine which one is true or false.
Both result will perform different statements.
Loops - Execute a group of commands repeatedly until some condition is met.
Class A class can be defined as a template or blueprint that describes the
behaviors/states that objects of its type support.
Object in visual basic is an instance of a class to access the defined properties
and methods.
Method is basically a behavior. A class can contain many methods. It is in
methods where the logics are written, data is manipulated and all the actions are
executed.
Debug – is the act of finding out where in the code the application is going
wrong.

VB.Net Keywords
The following are the lists of the VB.Net reserved keywords.
AddHandler Alias As Byte
And Boolean ByVal
AddressOf
AndAlso ByRef Call
Case Each Like Overrides
Catch Else Long ParamArray
CBool ElseIf Loop Partial
CByte End Me Mod Private
CChar End If Module Property
CDate Enum MustInherit Protected
CDec Erase Public
MustOverrid
CDbl Error RaiseEvent
e
Char Event
MyBase
ReadOnly
CInt Exit
MyClass
ReDim
Class False
Namespace
REM
CLng Finally
Remove
CObj For Narrowing
Handler
Const Friend
New Resume
Continue Function
Next Return
CSByte Get
Not SByte
CShort GetType
Nothing Select
CSng GetXML
Not Set Shadows
CStr Namespace
Inheritable
CType
Shared
Global
CUInt
Not Short
GoTo
CULng Overridable
Single
Handles
CUShort
Static
If Object
Date
Step
Implements Of
Decimal
Stop
On
Declare
Imports String
Operator
Default
In Structure
Option
Delegate Sub
Inherits
Optional
Dim SyncLock
Integer
Or
DirectCast Then
Interface
OrElse
Throw
Is
Do Overloads
To
IsNot
Double Overridable
True
Let Lib
Try UInteger With WriteOnly
TryCast While WithEvents Xo
TypeOf Widening

Identifiers
An identifier is a name used to identify a class, variable, function, or any other
user-defined item. The basic rules for naming classes in VB.Net are as follows −
• A name must begin with a letter that could be followed by a sequence of
letters, digits (0 - 9) or underscore. The first character in an identifier
cannot be a digit.
• It must not contain any embedded space or symbol like ? - +! @ # % ^ & *
( ) [ ] { } . ; : " ' / and \. However, an underscore ( _ ) can be used.
• It should not be a reserved keyword.

ACTIVITIES

In your own understanding about the lesson today write a paragraph by


answering the question “what is the role of visual basic in creating a program?”.

________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________________.

Rubrics:

Needs Score
Very Good Good
improvement
Knowledge
Does your response clearly
show you have read and
understand the lesson content 10 6 2
by correctly defining key terms,
key persons and
summarizing concepts?
Analysis
Have you clearly stated
analysis and give examples to
back them up? 10 6 2
Does your response provide
analysis to the larger concepts
of the lesson?
Total /20

*Answer Worksheet number 1 and submit a soft copy/hard copy of your


completed activity to your subject teacher on the following meeting.

WRAP–UP

Instruction: In your own understanding, summarized the lesson in the form


of paragraph.

Rubrics:

Needs Score
Very Good Good
improvement
Knowledge
Does your response clearly
show you have read and
understand the lesson content 5 3 2
by correctly defining key terms,
key persons and
summarizing concepts?
Analysis
Have you clearly stated
analysis and give examples to
back them up? 5 3 2
Does your response provide
analysis to the larger concepts
of the lesson?
Total /10

VALUING

Instructions: Read and answer the following questions carefully in two to


three sentences each number.
1. What do think is the importance of learning elements and fundamentals of
programming?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

2. How will you use the knowledge you acquired in this module?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

POST TEST
Instruction: Select the letter that corresponds to the correct answer.

1. Those are the self-explanatory notes to provide detailed information about


the code which we wrote in our applications.
A. variables
B. keywords
C. data type
D. comment
2. It represents storage locations and each variable will have a particular
data type to determine the type of values the variable can hold.
A. variables
B. keywords
C. data type
D. comment

3. It Contain instructions hat tell what a program does.


A. statement
B. project
C. solution
D. debug

4. It is the act of finding out where in the code the application is going
wrong.
A. statement
B. project
C. solution
D. debug

5. A collection of files that can be compiled to create a distributable


component (program).
A. statement
B. project
C. solution
D. debug

KEY TO CORRECTION
C 5. B 5.
B 4. D 4.
A 3. A 3.
B 2. A 2.
D 1. D 1.

Pre-test: Post-test:

REFERENCES
• Accessed November 6, 2020 3:30pm
https://www.tutlane.com/tutorial/visual-basic
• Accessed November 9, 2020 4:00pm https://www.tutorialspoint.com/vb.net
• Computer Programming Volume I by Innovative Training Works, Inc.
• Computer Programming Volume II by Innovative Training Works, Inc.

You might also like