SUBJECT: TECHNOLOGY AND LIVELIHOOD EDUCATION (TLE)
SPECIALIZATION: INFORMATION & COMMUNICAITON TECHNOLOGY (ICT,
GRADE 9 MODULE
COMPUTER
PROGRAMMING
Volume |
Innovative Training Works, Inc.
QUARTER 1: WEEK 7 TO WEEK 8
Teacher: EDGAR M. BATISTIANA
NAME OF STUDENT: __
SECTION: CONTACT #t
Reference: REX Book Store= Introduction to Computer Programming
+ Definition of Computer Program
+ Definition of Programming
+ Definition of Programming Language
+ Brief History of Programming Language
+ Classification of Programming Language
+ Program Development Process
VisualBaSic
JavaScript Visual C++
oO
A pb. 5Qh
V oAssembly
A l
omnes Beene Fw
At the end of this lesson, the students should be able to:
understand basic programming concepts;
learn various programming languages;
classify programming languages;
identify the usage of each programming languages;
enumerate the process in program development; and
ayawno
share opinion in choosing the best programming language to use in creating a
specific application.B}tesson Discussion
Current and future computer programming principles have influenced sophisticated
technologies, such as voice recognition and artificial intelligence, which affect our day-to-
day lives. With the ever-changing face of computer technology, programming has become
an exciting and forever challenging environment that more and more people would like to
get involved with.
WHAT IS A COMPUTER PROGRAM?
A computer program is a series of instructions written to perform a specified task on
a computer. A computer needs a program to work. The program has an executable form
that the computer can use directly to perform instructions. A programmer is a person who
writes, develops, and debugs the computer program.
WHAT IS PROGRAMMING?
Programming is the art or process and science of creating/writing programs. It is the
process done by programmers to instruct a computer on how to do a task. It is the process
of planning and designing solutions for a particular problem and then writing the code
using a programming language.
WHAT IS A PROGRAMMING LANGUAGE?
A programming language is a tool that allows programmers to write commands or
programs that can easily be understood by a person and translated into codes that are
machine-readable. This is the form of communication that programmers use to develop
applications, scripts, or other sets of instructions for a computer to execute.
A Brief History of Programming Language
To appreciate programming languages, you will need to review the other languages
that preceded it. Programmers write a set of instructions called programs using various
programming languages. Some programs are directly understandable by computers, while
others require separate programs to translate instructions into machine code. The first
programming languages were invented even before the modern computer was made.
‘At the beginning, to program the computer, one must understand the binary language
or commonly known as machine language, which relates electric switching 0 for off and 1 for
on. First modern computers were created during the 1940s, and by that time programmers
are coding using the assembly language. To convert assembly language into a language that
is readable by the computer, an assembler is used, The assembler is the world's first software
tool.
In the 1950s, IBM developed FORTRAN (Formula Translating System), a language that
is used for scientific processing, This programming language is so powerful that it is even
used in supercomputers. FORTRAN remained one of the popular programming languages
50 years after its invention.rogramming
By 1959, Conference on Data Systems Languages created (08 english-like, aS
language for business use. The aim was to make programming ar 5 years after, John
that both programmers and management could read it. In 1964, jus uage called BASIC
G. Kemeny and Thomas E. Kurtz invented a new programming langvace oe fa,
(Beginner's All-purpose Symbolic Instruction Code). The said langue th less technical
timesharing and was intended to make programming easier for those Aci the Microsoft
background. One of the common examples of languages inspired by 8
Visual Basic.
ing language
During 1968-1969, Nikolaus Wirth designed Pascal, a popular programming i ae
that time. Pascal was intended to be a teaching tool. In 1970s, Ken Thomps| eccired trom
Ritchie developed another language called 8 in Bell Laboratories, which was inspired from
FORTRAN. It was used to code systems and another language software. Moreover, d from B
language was developed by Ritchie, which is the C programming language derive ‘es
and Pascal. This languages still popular today. A lot of widely used programming languag
are based from C. Examples of them are C++, Java, Python, and PHP.
CLASSIFICATION OF PROGRAMMING LANGUAGE
Programming languages can be viewed or classified into four general types: machine
language, assembly language, high-level language, and object-oriented/event driven
programming language.
Machine Language
This is the only language that a computer can understand. The machine language
is difficult to understand because it only understands the binary system that uses two
numbers, Os and 1s, known as the machine code. Programmers have to write program
instructions using combinations of Os and 1s. Imagine how challenging it would be to leatn
how to create simple commands using the machine language.
0100
001101 100000 001101 110001
0010110001 10000
01110
111001
111001 001 11000 001
11000
0011100
‘Sample Program Written in Machine Language
This language is also called the lowest level Programming langua .
earlier, binary numbers Oand 1 represent codes; each of those digits is called Bie et
and 1 is for on and through this, the CPU executes the Program mechanically, it. O is for off
Assembly Language
This is more advanced than the machine language. Assembh
mnemonics in place of Os and 15 to simplify the Programmer's way of eae a
rograms.
| anc SSR Te 2Mnemonics are memory aids. Instead of using numbers, programmers began using English-
like abbreviations such as mov for move, mul for 2 multiply operation, add for an addition
operation, and so on.
Example:
Machine Language
10110000 01100001
Assembly Language
Mov al.016h
Although the assembly language is easier to understand, it is incomprehensible to
computers. Because of this, the assernbly language required another program called an
assembler, which translated assembly language statements into the target computer's
machine code. Due to its great speed and reliability, early console games in 1990s like
NBA Jam and some anti-virus programs were created using it. The infamous IBM PC DOS’
operating system is also programmed using the language.
Even though the language is created back in 1949, it is still one of the current
programming languages that are being used to develop complex applications and certain
device drivers. IBM Philippines, one of the biggest technology companies, applies the
language to support some of their apps.
High-Level Language
Programming in machine and assembly languages are too tedious and require highly
trained programmers. It is necessary for both languages to have numerous instructions to
accomplish even the simplest task.
To speed up the programming process, high-level languages were developed. High-
level languages allowed programmers to use English commands to carry out instructions.
Examples are: BASIC, COBOL, Pascal, FORTRAN, C, etc. These languages require separate
programs like an assembler to translate instructions to machine code. The translators
used were an interpreter or compiler. An interpreter translates high-level instructions into
machine code, line by line as the program is running, while a compiler translates the entire
program into machine code before running the program.
Example:
“Enter your name:”fnameS
“Enter your birth year:” byear$
Input “Enter the current year:“cyear$
AgeS = cyearS - byearS
Print fnames$, “, your age now is “, Age
EndMost of these languages are procedure-oriented, Procedure-oriented Eee Te
instructions must be properly sequenced in order for the computer to Process EAS
Correctly. Before the existence of OOP (Object-Oriented Programming). SY' :
Payroll and inventory were created using the procedure-oriented languages.
Medium to large-sized businesses are employing or outsourcing Pe One
IT companies to create and maintain their payroll, database, and inventory sy’ ramen ing
example of a company in the country that is still developing using high-level Prog!
languages is Collabera Solutions Private Limited.
Object-Oriented/Event-Driven Programming Languages (eur
A challenging problem arise when the advanced Graphical User meric a
environment, such as the Microsoft Windows Operating System, was ie sori
1980s. The GUI environment programs were more powerful and user-friendly bu
more complex programming tools.
‘Sample GUI Featuring a Button
‘As Windows required more complicated programming capabilities, new types of
programming languages were developed for them. These languages were called Object-
Oriented Programming (OOP) and Event-driven Programming languages. With these
languages, the emphasis of creating a program was on the objects included in the user
interface like buttons and scrollbars. Examples of which are: Visual Basic, Delphi, Visual C++,
PROLOG, and Smalltalk.
MessageBox.Show(“Hello, World!”)
‘Sample Block of Code in VB.Net
; applications such as Microsoft Office Word, Microsoft Office Excel,
, Migros es ar Microsoft Office PowerPoint are examples of an event-driven
Migoer lication’s work environment consists of graphics such as buttons, pictures,
COM ea eompanies in our country prefers this language like Anino Playlab (formerly
He io a a leading game developer and publisher since 2002, and Exist, a Java
cloner ‘and technology consulting company based in the Philippines,
_ ne EE ENONPROGRAM DEVELOPMENT PROCESS
In order to create a successful pr gram, y ‘ed to follow the proper developme:
| ogram,
ou nes f d t
The Steps in Program Development Process
Planning
First, identify the problem or the requirements of the client. Once you have an idea,
or if someone comes to you with an idea or a problem that needs to be solved using a
computer program, dedicate time to think and analyze the needed components for the
Program. Determine the overall goal or desired output of the program. Will the program
produce reports? Will the program calculate values? At this stage, programmers decide and
define the task that the program should perform.
Once you have identified the problems that need to be addressed, analyze the solutions
to these problems. This process will also help you define the required input and output in
order to achieve the computer programs’ goals.
Coding
Writing the source code is the second stage. You can use a program development tool
such as Small Basic to write a program. The source code is the actual set of programming
instructions that the computer follows. You will spend most of your programming time
working on the source code. Just remember that before you start coding, you should have
properly planned the intended purpose for the program and what it should do.
In this stage, programmers should have broad knowledge in the programming
language and they need to make sure that the program performs the way it is intended.
Testing and Debugging
Errors, called bugs, often appear in programs because of the details and syntax needed
for even the simplest programs. Therefore, you must test the program thoroughly and fix
the errors. The process of fixing errors is called debugging, Once a program is completely
free of errors, it is considered finished and ready to use.Documentation luded fc
is included for
When the pre r . » tester mentation
Jen (he proatany is finished and thoroughly tested, doc about a program such
{hy distubution Documentation inclides the necessary information the program, the
the progiany description, list of harchware equipment needed 0 1th
i eemed necessar
operating system conypatible with the program, and other specifications de mi
; such as wher
Lo ensure south installation ane use. Halo Contains tecTanicalinformatlon “VN dics
and who Geated the progam, contact information for issues OF CONES:
: am.
Importantly, instiuctions on the proper use and maintenance of the progt an
Malntenance
ating of the program. This is
ning smoothly, provide
sin the field it is
The final stage th programming is the maintenance oF upd
the point where the programmer is tasked to keep the program unr
Updates, and improvement in consideration of development and change:
used.
[okey torms
+ Computer Program — seties of instructions written to perform a specified task
on acomputer
+ Programmer — person who writes, develops, and debugs the computer program
+ Programming — process done by programmers to instruct a computer on how to
doa task
+ Programming language ~ tool that allows programmers to write commands or
programs
+ Machine langu
+ Assembly language — uses mnemonics in place of Os and 1s to simplify the
programmers’ way of creating programs
+ Mnemonics ~ memory aids used with assembly language to abbreviate an
ge ~ the only language that a computer can understand
operation
+ Assembler ~ translates assembly language statements into the target computer's
machine code
+ Bit each O and 1 inthe binary system,
+ High-level language ~ type of programming languages that has simpler and
English-like context
Interpreter ~ translates high-level instructions into machine code, line by line as
the program is running
. Compiler ~ translates the
program
. Gu! also known as Graphical User Interface, which lets software user to interact
with objects like scrollbars and buttons
OOP - method of programming based on a classes and objects
+ Coding ~ the last stage of the Program Developme
programmer will start writing the program
tire program into machine code before running the
‘nt Process, wherein the[QdJauestions for Discussion
1. Whatare the stages in the Program Development Process?
2. How can do you classify a programming language?
3. Ifyou will be given a chance to develop a program, what would it be and why?
A)tearning Activity
Research about the scope and limitations of each classification of a programming
language. Make a PowerPoint presentation about your research and include all the important
software or application produced from each classification. Try to be creative but make the
whole presentation clear. You can attach pictures in your presentation and try to rephrase
the contents. Include your references in the last slide. No need to present it to the class, your
instructor will grade your work accordingly based on the rubric below.
Rubrics for Presentation
[ 5 4 ey a2 1 | Score
Content Contentis | Contentis | Contentis | Contentis __| Contentis
precise and | accurate accurate and | lacking, some | inaccurate,
specific for the | but not precise but | important —_| almost all of
topic. tis also | presented in| the way itis | information is _| the important
presented in | chronological | presented is | not included. | information is
chronological | order, But | not thateasy |The whole | not included.
order. the whole | to follow. presentation | The whole
presentation isdifficultto | presentation
is still easy to understand | is dificult to
understand. understand,
Creativity | Presentation | Presentation | Presentaion | Presentation | Presentation
is pleasing to | is sill pleasing J is stil pleasing | isnot that is not pleasing
the eye and all |totheeye, | tothe eye, | pleasing tothe eye,
the graphics | graphics though, much | tothe eye, | background
andimages | andimages | better quality | background | is not
enhance it. | are sil of graphics | is not appropriate
Uniqueness | related while | and images | appropriate | for text color.
canbe seen enhancesit, shouldbe | fortext color, | Graphics and
‘and the overall | But the overall | placed. The | much better _ images related
theme is theme is quite | overall theme | quality of | tothe topic are
interesting. | common. is good but | graphics and _| not included
quite common. | images should
be placedMechanics | Spell check | Minimal errors | Some errors | Alotof erors | Alot of evors
has been used | in grammar, | in grammar, | in grammar, | ingrammer
throughout the | speling, speling, spelling, spelling,
presentation, | capitalization | capitalization | capitaization | capitalization
There is of punctuation | or punctuation. | or punctuation. | or punctuation
noerrorin | Presentation's | Presentation’s | Presentation’s | Presentations
grammar, contents are | contents content content
capitalization | minimally are not that | are not are not
or punctuation. | rephrased and | rephrased but | rephrased and | rephrased and
Presentation’s | references are | references are | references are | references are
contents are | included. included. incomplete _| not included.
rephrased and
references are
included.
Tota: | |
[E}tesson Summary
If you want your computer to do exactly what you want it to do, you must write a
program. A program is a set of instructions that tells the computer what to do. To be able
to create a program, you need a tool that will allow you to write instructions that can be
understood by the computer. Remember that computers can only understand the machine
code which is composed of 0s and 1s. The language used for earlier computers was called
the machine language. As computers and programming became more popular, the assembly
language was created, which used mnemonics instead of Os and 1s, It required a separate
program called an assembler to translate instryctions from assembly to machine code. The
translator was either an interpreter or a compiler. It was tedious and required highly trained
programmers that used English commands to carry out instructions. When Windows was
developed, a new type of programming language was created which was called the Object-
Oriented/Event-Driven Programming Language. It is the easiest way of creating programs by
simply using ready-made objects like buttons, scrollbars, list boxes, etc.
In order to create a program, you must follow a certain process. There are five
stages in the program development process: planning, coding, testing and debuggins,
documentation, and maintenance.
Errors or bugs often appear in programs because of the minute details needed for
even the simplest program. Therefore, you must test the program thoroughly and fix these
errors before releasing it to users. Fixing errors is called debugging.Score:, —_—_—_—_—
Name:
| section: ates
Post-Test
| Multiple Choice: Circle the letter of the correct answer,
| 1. Itisa person who writes, develops, and debugs the computer program.
a. technician
b. programmer
analyst
d. writer
2. It isa series of instructions written to perform a specified task on a computer.
a. compiler
b. programmer
computer program
d. language
3, It is a tool that allows programmers to write commands or programs that can
easily be understood by a person.
a. programming
b. computer program
programming language
d. translator
4. Itisone of the oldest programming language.
a. Python
b. HTML
c. PHP
d. COBOL
5. Which of the following is not a web language?
a. Visual Basic.NET
b. HTML
c. PHP
d. Ruby
6. It translates codes into something meaningful that the computer can under-
stand.
a. converter
b. translator
c. — transliterator
d, compilerThe following are all software languages except for:
a, VISUAL BASIC
b. HTML
ca CH
do C++
This generation of language allows the use of words and commands:
a. Ist generation
b. 2nd generation
. 3rd generation
d. 4th generation
Itemphasizes the objects included in the userinterface like buttons and scrollbars,
a. OOP
b. GUI
Cc KPL
d. BASIC
It is a language that is difficult to understand because it only uses two numbers,
Os and 1s.
a. machine language
b. assembly language
high-level language
d. object-oriented language
0 in binary language means off.
a. true
b. false
It is the term used in defining each digits in binary system.
a. byte
b. bit
c. bot
d. code
Itis the first programming language that is English-like and for business use.
a. COBOL
b. FORTRAN
«. C
d. Pascal20.
The majority of newer languages are based from what programming language?
a. COBOL
b. FORTRAN
a C
d. Pascal
'tis an English-like abbreviation that simplifies the programmer's way of creating
a program.
a. _ interpreter
b. mnemonics
assembly
d. COBOL
Ithelps you in determining the program's required goals, inputs, and output.
a. planning
b. coding
maintenance
d. documentation
It is the point where the programmer is tasked to keep the program running
smoothly and updated with recent developments and changes in the field where
it is used.
a. maintenance
b. coding
c. planning
d. documentation
It refers to the fixing of error in the computer program.
a. coding
b. testing
running
d. debugging
Novice programmers should start with a development environment.
a. true
b. false
Which of the following type of programming languages would you use to create
a user-friendly calculator application?
a. _ machine language
b. OOP
procedural language
d. assembly language