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

ComProg Module - M5 Final

This document provides an introduction to computer programming, including: 1) It discusses the history and classification of programming languages from machine language to modern high-level languages like C++ and Java. 2) The objectives of the document are to classify programming languages, understand algorithms and problem solving techniques, and learn about data types and variables. 3) It provides a 10 question pre-test to assess the reader's existing knowledge of programming concepts and terms.

Uploaded by

LEO JR GREFALDO
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

ComProg Module - M5 Final

This document provides an introduction to computer programming, including: 1) It discusses the history and classification of programming languages from machine language to modern high-level languages like C++ and Java. 2) The objectives of the document are to classify programming languages, understand algorithms and problem solving techniques, and learn about data types and variables. 3) It provides a 10 question pre-test to assess the reader's existing knowledge of programming concepts and terms.

Uploaded by

LEO JR GREFALDO
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

COMPUTER PROGRAMMING .

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

Page | 1 Computer Programming .Net  Quarter 3  Module 1


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

c. High-Level Language Sample Program Written in High-Level Language


Begin
Because programming in machine and assembly languages are too devious and Input “Enter your name:” fname$
require highly trained programmers, high-level programming languages were developed to Input “Enter your birth year:” byear$
speed up the programming process. High-level languages allow programmers to use Input “Enter the current year:” cyear$
English commands to carry out instructions. Examples of High-Level programming Age$ = cyear$ - byear$
languages are: BASIC, COBOL, Pascal, FORTRAN, C, etc. These languages require Print fname$, “, your age now is ”, Age$
separate programs like a compiler which translate the entire program into a machine code End
before running the written programming code.

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.

d. Object-Oriented/Event-Driven Programming 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

Page | 3 Computer Programming .Net  Quarter 3  Module 1


MessageBox.Show(“Hello, World!”)
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.

Sample Block of Code in VB.Net

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.

PROGRAMMING DEVELOPMENT PROCESS

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.

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.

Page | 4 Computer Programming .Net  Quarter 3  Module 1


Documentation
When the program is finished and thoroughly tested, documentation is included for its distribution. Documentation includes the necessary information about a
program such as the program description, list of hardware equipment needed to run the program, the operating system compatible with the program, and other specifications
deemed necessary to ensure smooth installation and use. It also contains technical information such as where and who created the program, contact information for issues or
concerns, and most importantly, instructions on the proper use and maintenance of the program.

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.

POST TEST (Identification)

1. It is a person who writes, develops and debugs the computer program.


2. It is a tool that allows programmers to write commands or programs that can easily be understood by a person.
3. It is a series of instructions written to perform a specified task on a computer.
4. Zero (0) in binary language means ________.
5. It emphasizes the objects included in the user interface like buttons and scrollbars.
6. It helps in determining the program’s required goals, inputs, and output.
7. It refers to the fixing of error in the computer program.
8. It is an English-like abbreviation that simplifies the programmer’s way of creating a program.
9. It is the only language that a computer can understand.
10. It is the stage when the programmer writes the source code.

NAME: GRADE / STRAND:

ANSWER SHEET
POST TEST: (Identification)

1. _____________________________________________________ 2. _____________________________________________________

Page | 5 Computer Programming .Net  Quarter 3  Module 1


3. _____________________________________________________
7. _____________________________________________________
4. _____________________________________________________
8. _____________________________________________________
5. _____________________________________________________
9. _____________________________________________________
PRE-TEST Answer Key: 1.B 2. C 3. C 4. B 5. B 6. B 7. A 8. D 9. C 10. C

6. _____________________________________________________
10. _____________________________________________________

Page | 6 Computer Programming .Net  Quarter 3  Module 1

You might also like