Professional Documents
Culture Documents
RSU-IIT 00-0027-MOD-2021-08-22
Prepared by:
HOYLE S. FAJANILAN JR, MIT
Document Code
This module is dedicated to Romblon State University students who are
enrolled in the subject computer Programming 1. This module aims to
train the first year students in designing, debugging, and developing a
program intended to solve computing problems using fundamental
programming constructs.
2 | Page
TABLE OF CONTENTS
MODULE ONE:
INTRODUCTION #
LEARNING OUTCOMES #
LESSON 1A: ENTER TITLE HERE #
LESSON 1B: ENTER TITLE HERE #
LESSON 1C: ENTER TITLE HERE #
LESSON 1D: ENTER TITLE HERE #
ASSESSMENT #
REFLECTIVE ANALYSIS #
REFERENCES #
MODULE TWO:
INTRODUCTION #
LEARNING OUTCOMES #
LESSON 2A: ENTER TITLE HERE #
LESSON 2B: ENTER TITLE HERE #
LESSON 2C: ENTER TITLE HERE #
LESSON 2D: ENTER TITLE HERE #
ASSESSMENT #
REFLECTIVE ANALYSIS #
REFERENCES #
MODULE THREE:
INTRODUCTION #
LEARNING OUTCOMES #
LESSON 3A: ENTER TITLE HERE #
LESSON 3B: ENTER TITLE HERE #
3 | Page
LESSON 3C: ENTER TITLE HERE #
LESSON 3D: ENTER TITLE HERE #
ASSESSMENT #
REFLECTIVE ANALYSIS #
REFERENCES #
MODULE FOUR:
INTRODUCTION #
LEARNING OUTCOMES #
LESSON 4A: ENTER TITLE HERE #
LESSON 4B: ENTER TITLE HERE #
LESSON 4C: ENTER TITLE HERE #
LESSON 4D: ENTER TITLE HERE #
ASSESSMENT #
REFLECTIVE ANALYSIS #
REFERENCES #
4 | Page
IT 2 – Computer Programming 1
MODULE ONE
5 | Page
INTRODUCTION
Module one covers all the important terms in the computer programming language. Also, it
discusses the different languages such as Assembly language, Machine language, Low-level
language, and High-level language. It also discusses the procedural and object-oriented
programming concepts.
LEARNING OUTCOMES:
● Define what computer programming is
● Explain the terms related to computer programming such as source code, programs,
etc.
● Differentiate Assembly Language and Machine Language
▪ LEARNING OBJECTIVES:
Upon completion of the course, the student should be able to:
● To know programming terms 09618143228
6 | Page
Computer Programming – is a way of giving computers instructions about what
they should do next. These instructions are known as code, and the computer
programmers write code to solve problems or perform a task. Also computer
programming is considered to be an art and at the same time a science. It is an art
because there is no standard way to interpret a problem and solve it using a
standard form of programming procedures and styles. It is fast becoming a science
because standard programming practice is starting to be adopted.
Programs fall into two major classes: application programs and operating systems.
An application program is one that carries out some function directly for a user,
such as word processing or game-playing.
An operating system is a program that manages the computer and the various
resources and devices connected to it, such as RAM (random access memory), hard
drives, monitors, keyboards, printers, and modems, so that they may be used by
other programs.
A programmer uses another type of program called a text editor to write the new
program in a special notation called a programming language. With the text editor,
the programmer creates a text file, which is an ordered list of instructions, also
called the program source file. The individual instructions that make up the
program source file are called source code. At this point, a special applications
program translates the source code into machine language, or object code — a
format that the operating system will recognize as a proper program and be able to
execute.
Three types of applications programs translate from source code to object code:
compilers, interpreters, and assemblers. The three operate differently and on
different types of programming languages, but they serve the same purpose of
translating from a programming language into machine language.
A compiler translates text files written in a high-level programming language—such
as Fortran, C, or Pascal— from the source code to the object code all at once.
7 | Page
Ex. Keyboard. After the computer executes a program to process data and produce
information, this information remains in the memory. Part of the program has to
show these results to the outside world. Output devices such as monitor screen
and printers are used to display the results to the user.
4. Software – computers today come bundled with some software already installed
in them. Operating System – performs for the programmer many tasks that used to
be very difficult to program.
8 | Page
The Simplest computer programs perform three basic operations:
• get the input from the keyboard
• process the input data
• display the results on the screen
High-level language
● It is easy to understand.
● It is easy to debug.
● It is difficult to understand.
● It is difficult to debug.
9 | Page
● It is not portable.
10 | Page
Machine language is the low level programming language. Machine language can only be
represented by 0s and 1s. In earlier when we have to create a picture or show data on the
screen of the computer then it is very difficult to draw using only binary digits(0s and 1s). For
example: To write 120 in the computer system its representation is 1111000. So it is very
difficult to learn. To overcome this problem the assembly language is invented.
Assembly language is the more than low level and less than high-level language so it is
intermediary language. Assembly languages use numbers, symbols, and abbreviations instead
of 0s and 1s.For example: For addition, subtraction and multiplications it uses symbols likes
Add, sub and Mul, etc.
Modifications and error fixing cannot be Modifications and error fixing can be
done in machine language. done in assembly language.
11 | Page
Machine Language Assembly Language
Procedural Programming
Object oriented programming can be defined as a programming model which is based upon
the concept of objects. Objects contain data in the form of attributes and code in the form of
methods. In object oriented programming, computer programs are designed using the
concept of objects that interact with real world. Object oriented programming languages are
12 | Page
various but the most popular ones are class-based, meaning that objects are instances of
classes, which also determine their types.
Languages used in Object Oriented Programming:
Java, C++, C#, Python,
PHP, JavaScript, Ruby, Perl,
Objective-C, Dart, Swift, Scala.
In object oriented
programming, program is
In procedural programming, program is divided into small parts
divided into small parts called functions. called objects.
13 | Page
Procedural Oriented Programming Object Oriented Programming
In object oriented
In procedural programming, function is more programming, data is more
important than data. important than function.
REFERENCES
1. Abraham (2015). Coding for dummies. John Wiley and Sons: Hoboken, NJ
2. Zak, D (2015). An Introduction to Programming with C++. 8th Edition
3. Cadenhead, R et. Al. (2016). C++ in 24 Hours, Sams Teach Yourself (6th Edition). Sams
Publishing
4. McGrath, M. (2017). C++ programming in easy steps (5th ed.). Warwickshire, United
Kingdom: Easy Steps Limited
5. Tale, T. (2016). C++: The Ultimate Beginners Guide to C++ Programing. CreateSpace
Independent Publishing Platform
14 | Page
15 | Page
MODULE TWO
16 | Page
INTRODUCTION
Module two covers all the important terms in writing, reading, and interpreting algorithms,
Flow charts and pseudocode and their components.
LEARNING OUTCOMES:
● what defines an algorithm, how to represent algorithms, and what makes
algorithms efficient.
● Explain what a flow chart is and its components
▪LEARNING OBJECTIVES:
Upon completion of the course, the student should be able to:
● To understand algorithms
● To Create a flowchart
● To write a pseudocode
Consider the following three examples. What do they all have in common?
17 | Page
Each of these examples are algorithms, a set of instructions for solving a problem. Once we
have created an algorithm, we no longer need to think about the principles on which the
algorithm is based. For example, once you have the directions to John's house, you do not
need to look at a map to decide where to make the next turn. The intelligence needed to find
the correct route is contained in the algorithm. All you have to do is follow the directions. This
means that algorithms are a way of capturing intelligence and sharing it with others. Once you
have encoded the necessary intelligence to solve a problem in an algorithm, many people can
use your algorithm without needing to become experts in a particular field.
18 | Page
The following outline of a simple program illustrates pseudocode. We want to be able to enter
the ages of two people and have the computer calculate their average age and display the
answer
After developing the program design, we use the pseudocode to write code in a language (like
Pascal, COBOL, FORTRAN, "C", " C++", etc.) where you must follow the rules of the language
(syntax) in order to code the logic or algorithm presented in the pseudocode. Pseudocode
usually does not include other items produced during programming design such as identifier
lists for variables or test data.
19 | Page
Simple Flowcharting Symbols
Terminal
The Ovals, or terminal points, indicate the flowchart’s starting and ending points
Flow Lines
Input/Output
20 | Page
Process
Decision
The diamond is used to represent the true/false statement being tested in a decision symbol.
Connectors
Sometimes a flowchart is broken into two or more smaller flowcharts. This is usually done
when a flowchart does not fit on a single page, or must be divided into sections. A connector
symbol, which is a small circle with a letter or number inside it, allows you to connect two
flowcharts on the same page. A connector symbol that looks like a pocket on a shirt, allows
you to connect to a flowchart on a different page.
21 | Page
Reference
● Programming Fundamentals A Modular Structured Approach, 2nd Edition,
KENNETH LEROY BUSBEE AND DAVE BRAUNSCHWEIG
● cnx.org: Programming Fundamentals – A Modular Structured Approach using C+
+
● Online Interactive Modules for Teaching Computer Science Osman Balci
William S. Gilley, Robin J. Adams, Emre Tunar, N. Dwight Barnette Department of
Computer Science 660 McBryde Hall, MC 0106 Virginia Tech Blacksburg, VA
24061, U.S.A
22 | Page