ComProg Module - M5 Final
ComProg Module - M5 Final
NET
(Q3) INTRODUCTION TO COMPUTER PROGRAMMING
DURATION : 3 - 4 WEEKS
TEACHER : Coole
EMAIL : [email protected]
NOTE: Use your answer on the answer sheet provided (Check the last page). DO NOT write anything on the module.
OBJECTIVES
Classify programming languages and identify its usage, and enumerate the process in program development.
Understand algorithm, use pseudocode and flowchart in problem solving; and
Identify data types and variables.
PRE-TEST |Choose the correct answer. You do not have to write your answer on the answer sheet. Check the Answer key on the last page to see if you got the correct
answers.
1. It is a person who writes, develops and debugs the computer program. 6. The following are all programming languages except for:
a. Technician b. Programmer a. Visual Basic b. HTML
c. Analyst d. Writer c. C# d. C++
2. It is a series of instructions written to perform a specified task on a computer. 7. It is the point where the programmer is tasked to keep the program running
a. Compiler b. Programmer smoothly and updated with recent developments and changes in the field where it is
c. Computer program d. Language used.
a. Maintenance b. Coding
3. It is a tool that allows programmers to write commands or programs that can c. Planning d. Documentation
easily be understood by a person.
a. Programming b. Computer program 8. It refers to the process of fixing errors in the computer program.
c. Programming language d. Translator a. Coding b. Testing
c. Running d. Debugging
4. It is a person who writes, develops and debugs the computer program.
a. Technician b. Programmer 9. The majority of newer programming languages are based from which
c. Analyst d. Writer programming language?
a. COBOL b. FORTRAN
5. Which of the following is not a classification of programming language? c. C d. Pascal
a. Machine Language b. Human Language
c. OOP Language d. Assembly Language 10. Which of the following is not a web language?
a. Visual Basic.Net b. HTML
c. Ruby d. PHP
LESSON 1: INTRODUCTION TO COMPUTER PROGRAMMING
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.
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.
By 1959, Conference on Data Systems Languages created COBOL, a programming language for business use. The aim was to make programming languages English-
like, so that both programmers and management could read it. In 1964, just 5 years after, John G. Kemeny and Thomas E. Kurtz invented a new programming language called
BASIC (Beginner's All-purpose Symbolic Instruction Code). The said language is designed for timesharing and was intended to make programming easier for those with less
technical background. One of the common examples of languages inspired by BASIC is the Microsoft Visual Basic
During 1968-1969, Nikolaus Wirth designed Pascal, a popular programming language that time. Pascal was intended to be a teaching tool. In 1970s, Ken Thompson
and Dennis Ritchie developed another language called B in Bell Laboratories, which was inspired from FORTRAN. It was used to code systems and another language
software. Moreover, another language was developed by Ritchie, which is the C programming language derived from 8 and Pascal. This language is still popular today. A lot
of widely used programming languages 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.
a. 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, 0s and 1s, known as the machine code. Sample Program Written in Machine Language
Programmers have to write program instructions using combinations of 0s and 1s.
0100
001101 100000 001101 110001
Page | 2 Computer Programming .Net Quarter 3 Module 1 00101 10001 10000
01110
This language is also called the lowest level programming language. As mentioned earlier, binary numbers 0 and 1 represent codes; each of those digits is
called a bit. 0 is for off and 1 is for on and through this, the CPU executes the program mechanically.
b. Assembly Language
This is more advanced than the machine language. It uses mnemonics in place of 0s and 1s Machine Language Assembly Language
to simplify the programmer’s way of creating programs. Mnemonics are memory aids. Instead of
using numbers, programmers began using English-like abbreviations such as mov for move, mul for 10110000 01100001 Mov al. 016h
multiply operation, add for addition operation, and so on.
Although the assembly language is easier to understand, it is comprehensible to computers. Because of this, the assembly 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 – since then, it is one of the programming languages that is being used to develop
complex applications and certain device drivers.
Most of these languages are procedure-oriented. Procedure-oriented means that the instructions must be properly sequenced in order for the computer to
process the tasks correctly. Before the existence of OOP (Object-Oriented Programming), systems such as payroll and inventory were created using the procedure-
oriented languages.
A challenging problem arise when the advanced Graphical User Interface (GUI) (which lets software user to interact with
objects like scrollbars and buttons) environment, such as the Microsoft Windows Operating System, was introduced in the 1980s. The
GUI environment programs were more powerful and user-friendly but demanded more complex programming tools.
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
Microsoft Office applications such as Microsoft Office Word, Microsoft Office Excel Microsoft Office Access, and Microsoft Office PowerPoint are examples of an
event-driven program. The application's work environment consists of graphics such as buttons, pictures, and text. Many companies in our country prefers this language like
Anino Playlab (formerly Anino Games), a leading game developer and publisher since 2002, and Exist, a Java development and technology consulting company based in the
Philippines.
In order to create a successful program, you need to follow the proper development process listed.
Testing and
Planning Coding Documentation Maintenance
Debugging
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.
Maintenance
The final stage in programming is the maintenance or updating of the program. This is the point where the programmer is tasked to keep the program running
smoothly, provide updates, and improvement in consideration of development and changes in the field it is used.
ANSWER SHEET
POST TEST: (Identification)
1. _____________________________________________________ 2. _____________________________________________________
6. _____________________________________________________
10. _____________________________________________________