0% found this document useful (0 votes)
203 views

Comp Prog 12 W7 W8

This document provides an introduction to programming and discusses program development approaches. It discusses selecting an appropriate development approach based on job requirements and creating an initial plan to guide the process. It also discusses basic concepts of programming languages and their interaction. The document contains lessons and activities to help learners understand programming concepts and determine a suitable approach for software development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views

Comp Prog 12 W7 W8

This document provides an introduction to programming and discusses program development approaches. It discusses selecting an appropriate development approach based on job requirements and creating an initial plan to guide the process. It also discusses basic concepts of programming languages and their interaction. The document contains lessons and activities to help learners understand programming concepts and determine a suitable approach for software development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

12

PROGRAMMING (NC IV)


Quarter 1 – Module 4
INTRODUCTION TO PROGRAMMING 2
WEEKS 7 and 82

SDO TAGUIG CITY AND PATEROS


2
Introductory Message
For the facilitator:

This module was collaboratively designed, developed and evaluated by the Development and Quality
Assurance Teams of SDO TAPAT to assist you in helping the learners meet the standards set by the K
to 12 Curriculum while overcoming their personal, social, and economic constraints in schooling.

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. Furthermore,
you are expected to encourage and assist the learners as they do the tasks included in the module.

For the learner:

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.

The following are some reminders in using this module:

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. Don’t forget to answer Let’s Try before moving on to the other activities included in
the module.
3. Read the instruction carefully before doing each task.
4. Observe honesty and integrity in doing the tasks and checking your answers.
5. Finish the task at hand before proceeding to the next.
6. 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!

3
Lesson
INTRODUCTION TO
1 PROGAMMING (Part 2)

Let’s Learn

In this module, the lessons are mostly concerned with how the learners
understand the basic concepts that appear in modern programming languages,
their interaction, and the relationship between programming languages and
methods for program development.

LO 1. DETERMINE AND SELECT APPROPRIATE PROGRAM


DEVELOPMENT APPROACH

At the end of the module, the students will be able to:

LO 1. Determine and select appropriate program development approach


1. Select appropriate program development approach
2. Determine appropriate program activities based on the job requirements
3. Create an initial plan that will guide the program development process

Let’s Try

In this activity, the trainer would try to assess the learners’ prior knowledge and
experience on the Microsoft Visual Studio including some terms related to proper
coding.

PRE - ASSESSMENT

4
4

5
3
1

Errors | Warnings | Messages

TEST I - LABELING
Direction: Name the following parts of the Microsoft Visual Basic Screen.
Write your answer on the space below:

1. _______________________________________
2. _______________________________________
3. _______________________________________
4. _______________________________________
5. _______________________________________

TEST II – MULTIPLE CHOICE


Directions: Read each sentence carefully. Encircle the letter of the correct answer.

1) This variable type has only two values, usually called \true" and \false".
a. Characters c. Boolean
b. Variable d. Value of variable
2) This variable represent the fractional numbers encountered while computing,
examples we gave as alternative representations for the constant of gravity:
0.00000000006673, 6.673e-11, and 0.6673e-10.
a. Characters c. Boolean
b. Floating-point d. Integer
3) It is a set of values.
a. Characters c. Block
b. Type d. Control
4) This is not one of its attributes, but is determined by its content and by its type.
a. Characters c. Boolean
b. Variable d. Value of variable
5) It is a sequence of definitions and statements enclosed in braces.
a. Expressions c. Block
b. Type d. Control
6) These are an advance over the early days of programming, when every statement
corresponded to a single machine instruction.
a. Expressions c. Block
b. Type d. Control
7) This represent to a value of any expression can be made to depend on the value of a
Boolean expression.
a. Expressions c. Conditional expression
b. Type d. Control
8) This depends on conditions, this may be skipped or repeated or retrieved from
function bodies and then general topic of what gets executed or evaluated next.
a. Expressions c. Conditional expression

5
b. Type d. Control
9) It is memory of which it is known at compile time that it will be needed at run time.
This memory is allocated at compile time.
a. Array c. Dynamic memory
b. Static memory d. Data type
10) The following are examples of mathematical operators use in flowcharting and
programming, except ________________.
a. Add c. +
b. * d. /

L.O. 1: SELECT THE PROGRAM LOGIC DESIGN APPROACH

PERFORMANCE STANDARD

The learners shall be able to independently create a software development plan


that applies applicable program development approach, as prescribed by
TESDA Training Regulations.

Let’s Recall

In this portion of the module, the learners will be given series of challenges as
to develop critical and creative thinking so when the new programming lesson
is tackled, they will find it fun and easy to learn.

Mechanics: This will be done via group activity challenge. Every group will be
given 3-5 minutes to complete the task. Presentations will follow .

DRILL # 1 – JAVA CODING


1. Open Java
2. In case, there is no software to support what is being asked in the program,
the students may use any word processing software
3. Write the program header
4. Encode the PSEUDOCODE of the program
5. Identify the input being asked
6. Formulate equations
7. Display the values being asked
8. Run the program
9. In case of bug, debug it and run again.
10. Save the program

6
Let’s Explore

As the lessons progress, the students are going to have broad understanding
of the programming in the world we live in today.

Directions: Browse the hyperlink to see the video about POS done in VB.Net. Watch the video
closely; replay it if not properly understood.

https://www.youtube.com/watch?v=SQnG_1k_Fek

Let’s Elaborate

LO 1: DETERMINE AND SELECT APPROPRIATE PROGRAM


DEVELOPMENT APPROACH

Integrated Development Environment


Computers can do such a wide variety of things because they can be programmed.
This means that computers are not designed to do just one job, but to do any job
that their programs tell them to do. A program is a set of instructions that a
computer follows to perform a task.

AN INTRODUCTION TO HARDWARE AND SOFTWARE


HARDWARE
The term hardware refers to all of the physical devices, or components, that a computer is
made of. A computer is not one single device, but a system of devices that all work together.
Like the different instruments in a symphony orchestra, each device in a computer plays its
own part. The components are listed below:
 The central processing unit (CPU)
 Main memory
 Secondary storage devices
 Input devices
 Output devices

7
The CPU
When a computer is performing the tasks that a program tells it to do, we say that the
computer is running or executing the program. The central processing unit, or CPU, is the
part of a computer that actually runs programs. The CPU is the most important component
in a computer because without it, the computer could not run software.

Main Memory
You can think of main memory as the computer’s work area. This is where the computer
stores a program while the program is running, as well as the data that the program is
working with. Main memory is commonly known as random-access memory, or RAM.

Secondary Storage Devices


Secondary storage is a type of memory that can hold data for long periods of time,
even when there is no power to the computer.
A disk drive stores data by magnetically encoding it onto a circular disk. Most
computers have a disk drive mounted inside their case.
A floppy disk drive records data onto a small floppy disk, which can be removed
from the drive. Floppy disks have many disadvantages, however.
USB drives are small devices that plug appear to the system as a disk drive. These
drives do not actually contain a disk, however. They store data in a special type of
memory known as flash memory.
Optical devices such as the CD (compact disc) and the DVD (digital versatile disc)
are also popular for data storage. Data is not recorded magnetically on an optical
disc, but is encoded as a series of pits on the disc surface.
Input is any data the computer collects from people and from other devices. The
component that collects the data and sends it to the computer is called an input
device. Common input devices are the keyboard, mouse, scanner, microphone, and
digital camera.
Output is any data the computer produces for people or for other devices. It might
be a sales report, a list of names, or a graphic image. The data is sent to an output

8
device, which formats and presents it. Common output devices are video displays and
printers.

SOFTWARE
If a computer is to function, software is not optional. There are two general categories
of software: system software and application software.
System Software
The programs that control and manage the basic operations of a computer are
generally referred to as system software. System software typically includes the
following types of programs:
Operating Systems, an operating system is the most fundamental set of programs
on a computer. The operating system controls the internal operations of the
computer’s hardware, manages all of the devices connected to the computer.
Application Software
This program makes a computer useful for everyday tasks are known as application
software. These are the programs that people normally spend most of their time
running on their computers.

How computer stores data?


A computer’s memory is divided into tiny storage locations known as bytes. One byte
is only enough memory to store a letter of the alphabet or a small number. In order
to do anything meaningful, a computer has to have lots of bytes.
Each byte is divided into eight smaller storage locations known as bits. The term bit
stands for binary digit. Computer scientists usually think of bits as tiny switches
that can be either on or off. Bits aren’t actual “switches,” however, at least not in the
conventional sense.
How a computer program works?
A computer’s CPU can only understand instructions that are written in machine
language. Because people find it very difficult to write entire programs in machine
language, other programming languages have been invented.
CPU is the most important component in a computer because it is the part of the
computer that runs programs. Sometimes the CPU is called the “computer’s brain,”
and is described as being “smart.” Although these are common metaphors, you
should understand that the CPU is not a brain, and it is not smart.
To a CPU, however, this is an instruction to perform an operation. It is written in 0s
and 1s because CPUs only understand instructions that are written in machine
language, and machine language instructions always have an underlying binary
structure. The figure below demonstrates how:

9
Assembly Language
Assembly language programs cannot be executed by the CPU, however. The CPU only
understands machine language, so a special program known as an assembler is used
to translate an assembly language program to a machine language program.

Visual Basic .NET (VB.NET) is an object-oriented computer programming language


implemented on the .NET Framework. Although it is an evolution of classic Visual
Basic language, it is not backwards-compatible with VB6, and any code written in
the old version does not compile under VB.NET.
The .Net framework is a revolutionary platform that helps you to write the following
types of applications:
Windows applications
Web applications
Web services

The .Net framework consists of an enormous library of codes used by the client
languages like VB.Net. These languages use object-oriented methodology.
Following are some of the components of the .Net framework:

Integrated Development Environment (IDE) For VB.Net

Microsoft provides the following development tools for VB.Net programming:


Visual Studio 2010 (VS)
Visual Basic 2010 Express (VBE)
Visual Web Developer

10
Using these tools, you can write all kinds of VB.Net programs from simple command-
line applications to more complex applications. With .NET, the way that operating
system services are invoked is uniform across all languages (including code
embedded in ASP.NET pages).

This portion of .NET is commonly referred to as the .NET Framework class library.
A new infrastructure for managing application execution. To provide a number of
sophisticated new operating-system services—including code-level security, cross-
language class inheritance, cross-language type compatibility, and hardware and
operating-system independence, among others—Microsoft developed a new runtime
environment known as the Common Language Runtime (CLR).
A new web server paradigm. To support high-capacity web sites, Microsoft has
replaced its Active Server Pages (ASP) technology with ASP.NET. While developers
who are used to classic ASP will find ASP.NET familiar on the surface, the underlying
engine is different, and far more features are supported.
A new focus on distributed-application architecture. Visual Studio .NET provides top-
notch tools for creating and consuming web services -- vendor-independent software
services that can be invoked over the Internet. The .NET Framework is designed top
to bottom with the Internet in mind.

Graphical User Interface

Graphical User Interface


In text-based environments using procedural programs, the user responds to the
program. Modern operating systems, such as the Windows family, use a graphical
user interface, or GUI (pronounced gooey). Although GUIs have made programs
friendlier and easier to interact with
Whereas procedural programming is centered on creating procedures, object-
oriented programming is centered on creating objects. An object is a programming
element that contains data and actions. The data contained in an object is known
as its attributes. In Visual Basic, an object’s attributes are called properties. The
actions that an object performs are known as the object’s methods.
Microsoft Visual Basic Controls
In the previous section, you saw examples of several GUI elements, or controls.
Visual Basic provides a wide assortment of controls for gathering input, displaying
information, selecting values, showing graphics, and more.

11
4
2
5
3
1

Errors | Warnings | Messages

MICROSOFT VISUAL BASIC.NET SCREEN ELEMENTS

DESCRIPTIONS
1. Error List Window
 It shows all error messages, warnings and suggestions in a program after
compiling.
2. Windows Form Application
 This is where all the controls are placed. It shows the GUI form of the
program when executed.
3. Toolbox
 It contains many useful controls that allows a programmer to develop
Visual Basic programs.
4. Solution Explorer
 This window provides easy access to all forms associated with the project.
5. Properties Window
 This is used to view and set the properties of object. This can be seen on
the right side of the environment.

Procedures of Programming

PROCEDURAL AND OBJECT-ORIENTED PROGRAMMING


There are primarily two methods of programming used today: procedural
programming and object-oriented programming. Microsoft Visual Basic.Net is both
procedural and object-oriented in nature.

Procedural Programming
The earliest programming languages were procedural. Procedural programming
means that a program is made of one or more procedures. A procedure is a set of
programming language statements that are executed by the computer.

Object-Oriented Programming
Object-oriented programming or OOP is an industry standard model for designing
and coding programs. When designing applications, designers use real-world objects

12
to express patterns, called classes in softwareThe program we write would create
objects, or instances of these classes.

Classes contain attributes, expressed as variables. For example, a class named


Account would probably contain attributes such as balance, account ID, and
payment history.

The SDLC or System Development Life Cycle Approach


1. System Planning/ Investigation
 System planning usually begins with a formal request to the I.T.
solutions a system request, a system request describes problems or
desired changes in an information system or business process.
2. System Analysis
 The purpose of the system analysis phase is to understand business
requirements and to build a logical model of the new system
3. System Design
 The purpose of the system design is to create a blueprint to the new
system that will satisfy all documented requirements whether the system
is being developed in-house or purchase as package
 Logical Design – description of the functional requirements of the
system
 Physical Design – specifications of the characteristics of the system
components necessary to put logical design into action
4. System Implementation
 During system implementation, the new system is constructed. Its
objective is to deliver a completely functioning and documented
information
5. System Maintenance
 Involves the identification of errors or bugs in the written program,
technical and hardware problems and changes in existing hardware and
software specification based on the system specification requirements.

While creating a Visual Basic application, you will spend much of our time doing
three things:
1. Creating the GUI elements that make up the application’s user interface,
2. Setting the properties of the GUI elements, and
3. Writing programming language statements that respond to events and
perform other operations. In this section, we take a closer look at these
aspects of Visual Basic programming.

Event-Driven Programming
Programs that operate in a GUI environment must be event-driven. An event is an
action that takes place within a program, such as the clicking of a control. All Visual
Basic controls are capable of detecting various events
BASIC SYNTAX
When we consider a VB.Net program, it can be defined as a collection of objects that
communicate via invoking each other's methods. Let us now briefly look into what
do class, object, methods, and instant variables mean.
Object

13
Objects have states and behaviors. Example: A dog has states - color, name, breed
as well as behaviors - wagging, barking, eating, etc. An object is an instance of a
class.
Class
A class can be defined as a template/blueprint that describes the behaviors/states
that object of its type support.
A RECTANGLE CLASS IN VB.NET
Depending upon the design, it may need ways for accepting the values of these
attributes, calculating area and displaying details.

Methods
A 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.
Instant Variables
Each object has its unique set of instant variables. An object's state is created by the
values assigned to these instant variables.
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.

14
Writing Elementary Program

As Procedural Programming
This program will print simple string value: Welcome to Visual Basic!

In this example, the coding was done using program console!


Module Module1

Sub Main ()

Console.WriteLine ("Welcome to Visual Basic!")


Console.ReadLine ()

End Sub

End Module

The next screen is the output screen.


Welcome to Visual Basic!

As Object-Oriented Programming

This program will print simple string value: Welcome to Visual Basic!
1. Creating the GUI…

2. Setting the Properties…

15
Changing

3. Writing programming language…

The OUTPUT in Microsoft Visual Studio APP

Let’s Dig In

CREATE THE INTERFACE OF YOUR FACEBOOK’S USERNAME AND


PASSWORD USING THE 3 STEPS TO FOLLOW IN CREATING VB.NET
PROGRAM.
CRITERIA 5 3 1
Clarity of The interface is pleasing to The features can still be The entry is difficult to
Description the eyes and easy to read. read. read.
Creativity The harmony of text and There is a little design. There is no design.
background is amazing.

16
Let’s Remember

Directions: Read and analyze the questions below. Write your understanding on every
competency learned. To be answered on separate sheet of papers for modular and use
Google docs for blended. Submit it on the Google drive when finished.
1) What is the importance of understanding the human languages and machine
language?
2) Why should a programmer devote time in exploring the full features of VB.Net and
not just wait for the trainer to explain?
3) If you were to create a program for our school, what would it be and why?

CRITERIA 5 3 1
Relevance The answer is complete in The answer is somehow The answer has little
contents and insights good in contents and content and insights
insights
Grammar The answer is The answer has some The answer have many
grammatically correct incorrect grammar incorrect grammar

Let’s Apply

CREATE THE INTERFACE OF THE COMPUTER KEYBOARD


Directions:

CRITERIA 5 3 1
Accuracy All controls are correct Some controls are Few controls are correct
correct
Creativity The same with the given Some of the features are Not the same with the
guide the same with the guide guide
Timeliness Submitted on time/ before Not able to pass on time Super late in submission
time

17
Let’s Evaluate

TEST I – MULTIPLE CHOICE


Directions: Read each sentence carefully. Encircle the letter of the correct answer.

_____1. This controls the internal operations of the computer’s hardware,


manages all of the devices connected to the computer, allows data to be
saved to and retrieved from storage devices, and allows other programs
to run on the computer.
A. Operating System C. Application Software
B. Microsoft Word D. Windows

_____2. These are the programs that people normally spend most of their
time running on their computers.
A. Operating System C. Application Software
B. Microsoft Word D. Windows

_____3. A computer’s memory is divided into tiny storage locations known


as __________.
A. ROM C. bit
B. RAM D. bytes

_____4. It is used to translate an assembly language program to a


machine language program.
A. Assembler C. Code
B. Compiler D. Program

_____5. It is an object-oriented computer programming language


implemented on the .NET Framework.
A. Algorithm C. Software
B. Visual Basic .Net D. Programming

_____6. It is a set of programming language statements that are executed


by the computer.
A. Program C. Pseudocode
B. Procedure D. SDLC

_____7. It is an industry standard model for designing and coding


programs.
A. Assembly Language C. Procedural Programming
B. Machine Language D. Object-Oriented Programming

_____8. The purpose of this SDLC is to create a blueprint to the new


system that will satisfy all documented requirements whether the
system is being developed in-house or purchase as package.
A. Logical Design C. System Design
B. Physical Design D. System Analysis

18
_____9. This system design is a description of the functional requirements
of the system.
A. Logical Design C. System Design
B. Physical Design D. System Analysis

_____10. This system design is a specification of the characteristics of the


system components necessary to put logical design into action.
A. Logical Design C. System Design
B. Physical Design D. System Analysis

_____11. The purpose of the SDLC phase is to understand business


requirements and to build a logical model of the new system.
A. Logical Design C. System Design
B. Physical Design D. System Analysis

_____12. This SDLC involves the identification of errors or bugs in the


written program, technical and hardware problems and changes in
existing hardware and software specification based on the system
specification requirements.
A. System Maintenance C. System Design
B. Physical Design D. System Analysis

_____13. It is an action that takes place within a program, such as the


clicking of a control.
A. Procedure C. Event
B. Identifier D. Class

_____14. This can be defined as a template/blueprint that describes the


behaviors/states that object of its type support.
A. Procedure C. Event
B. Identifier D. Class

_____15. It is a name used to identify a class, variable, function, or any


other user-defined item.
A. Procedure C. Event
B. Identifier D. Class

Let’s Extend

ASSIGNMENT:

19
1. Create a simple flowchart containing basic transaction that produced a
receipt.
2. Create an interface solution on VB.Net, or on MS Word using shapes or
simply done on paper to signify understanding of the lessons on this
module.

REFERENCES
BOOKS
Concepts in Computer Programming Language
John C. Mitchel
Types and Programming Languages
B. Pierce
Semantics with Applications
Flemming Nielson and Hanne Riis Nielson

PDF RESOURCES:
http://www.cs.tau.ac.il/~msagiv/courses/pl17/overview.pdf

https://homepages.dcc.ufmg.br/~camarao/lp/concepts.pdf

http://www.unhas.ac.id/~rhiza/arsip/kuliah/Komputasi-dan-Pemrograman/history-prog-lang.pdf
http://www2.cs.uregina.ca/~beattieb/CS350/notes/Chapter%202.pdf

YOUTUBE RESOURCES:
https://www.youtube.com/watch?v=SWRDqTx8d4k

https://www.youtube.com/watch?v=2De4hO3lu14

https://www.youtube.com/watch?v=6F8cTBbh_TI&list=PLMQ4k-hUWGNl-_4tGH-2Gq-06yZbzl5az

https://www.youtube.com/watch?v=ypUCTHskxCg
https://www.youtube.com/watch?v=7qclxWFkIAk

DEVELOPMENT TEAM OF THE MODULE


Writer : JOEL M. BURGOS
Content Editor : Jasper T. Aguilar

20
Language Editor : Jasper T. Aguilar
Reviewer : DR.ANGELA K. ALAMAN, Head Teacher IV-SVNHS
Illustrator : Jasper T. Aguilar

Layout Artist : Jasper T. Aguilar

HYBRID TEAM VALIDATORS:

SHS Team Leader/Facilitator:


DR. ROLANDO S. MAGNO, SDS (Ret.)
School Head In-Charge:
DR. GINA R. POBLETE, Principal III
Content Validator/Editor:
DR. RONALDO J. LASIN, Master Teacher
1
Management Team:
DR. MARGARITO B. MATERUM, SDS
DR. GEORGE P. TIZON, SGOD Chief
DR. ELLERY G. QUINTIA, CID Chief
Name of EPS in-charge of Learning Area
DR. VIRGINIA L. EBOŇA
DR DAISY L. MATAAC, EPS – LRMS/ALS

For inquiries, please write or call:

Schools Division of Taguig city and Pateros Upper Bicutan Taguig City

Telefax: 8384251

Email Address: sdo.tapat@deped.gov.ph

21

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy