Module 1 Page 1-12
Module 1 Page 1-12
CPE01: Fundamentals of
Computer and
Programming
Objectives
Upon completion of this course, students will be able to:
DRJNA20 Page 1
Course Outline
DRJNA20 Page 2
Module 1. Introduction to Programming, Logic
Formulation, and Design
Competency Goal 1: The learner will conduct researches and use appropriate
technology to build an understanding of what is programming and how program
logic is formulated.
Objectives:
DRJNA20 Page 3
Course Module
Introduction
What is programming?
DRJNA20 Page 4
and object-oriented. The procedure-Oriented Programming (POP) approach
focuses on creating procedures or a block of code sequentially, keeping in mind to
accomplish a specific job. The key features of this kind of approach are the use of
procedures, sequencing of procedures, and sharing global data.
Let us consider the process of “Mixing a Juice” to further illustrate the concept
of the logic formulation. When you want to make a juice there are certain steps you
need to do and so you can sip it in the end. Even we, humans, cannot take all the
steps at one time just to make a glass of juice, much so if a computer is to make it for
you. Computers work faster than human but despite that tremendous speed,
computers will still take your instructions one at a time. So what are the steps in
preparing a glass of juice? Consider the following steps:
1. Get a glass
2. Put a spoonful of powder juice into the glass
3. Pour cold water into the glass
4. Sir it with a spoon
5. Put an ice cube
6. Put a drinking straw
7. Sip through a straw
DRJNA20 Page 5
The above steps are arranged in a logical order. Steps 2 to 6 can be done
interchangeably without affecting the logical process except for steps 1 and 7.
Logic formulation simply means bringing the steps as required by the task in Proper
Order so that when it is executed procedurally the desired result is achieved
according to the required output specifications. Therefore, Programming Logic
Formulation is the process of coming up with the appropriate methodology in
developing a specific program logic that will perform a prescribed computing task
or solve a problem using the computer. Programming Logic Formulation is the
process of coming out with the basic steps to implement a procedure in computer
programming. This is usually resorted to when having a top-down design. Flowcharts
and pseudo-codes are two of the most common output of the exercise.
Software developers can use the Program Development Life Cycle (PDLC) to
define the program structure. The six phases of PDLC are defining the problem,
designing the program, coding the program, testing and debugging the program,
formalizing the solution, and maintaining the program.
Program Designing begins with deciding the output and framing the program
logic. The design is then broken down into modules to facilitate programming. All
computer languages have a vocabulary of their own. If a programmer does not
strictly follow the syntax of a programming language, the computer will not
understand the commands given in the program.
Programming Languages generally fall into two categories and these are the
low-level languages and high-level languages. First-generation languages and
second-generation languages are regarded as low-level languages, whereas the
languages of higher generations are regarded as high-level languages.
DRJNA20 Page 6
Machine language example
A "Hello, World" written for a 64-bit Intel processor. This can be compiled and run on
64-bit Linux.
DRJNA20 Page 7
Likewise, a high-level language doesn’t require the programmer to know the
details of a processor, but they still require programmers to specify the procedure to
be followed to solve a problem. High-level languages provide abstractions of low-
level operations which allow the programmer to focus more on describing what they
want to do and less on how it should be done. Programming this way is more
convenient and makes programs easier to read at the sacrifice of low-level control.
Programs are written in high-level languages never match the raw speed and
efficiency of programs written in assembly.
DRJNA20 Page 8
procedures or it. Languages used in Procedural Programming are FORTRAN, ALGOL,
COBOL, BASIC, Pascal, and C.
DRJNA20 Page 9
1. Robustness: Focuses on program continuation capability, regardless of errors
or incorrect data.
2. Reliability: focuses on the correct design and algorithm implementation.
3. Efficiency: focuses on memory, hardware, or other properties used to optimize
programs.
4. Readability: proper documentation and indentation availability, which
provides insight into other program developers or designers.
Let’s test your learning by answering our first quiz. Good luck!
DRJNA20 Page 10
Quiz #1.1
Good Luck!
Assessment
“Any fool can write code that a computer can understand. Good programmers
write code that humans can understand.” – Martin Fowler
Multiple Choices
Direction: This is a 10-item quiz. Read each statement carefully and choose the
correct answer from the given options below.
DRJNA20 Page 11
5. Which of the following is best to consider during program development?
a. software requirements specify what the task is that the program must perform
b. software requirements specify how the program will accomplish the task
c. software requirements specify how to test the program when it is done
d. software requirements specify how to divide the task into subtasks
6. Which of the following is the process of finding errors and fixing them within a
program?
a. Debugging
b. Compiling
c. Executing
d. Coding
8. List are the three (3) types of language translators except __________.
a. Syntax
b. Compiler
c. Assembler
d. Interpreter
DRJNA20 Page 12
References:
https://www.yourdictionary.com/programming
http://www.scribd.com/doc/7368548/Logic-Formulation
http://au.answers.yahoo.com/question/index?qid=20071110191353AABcdvH
http://wiki.answers.com/Q/What_are_the_logic_formulation
https://www.computerhope.com/jargon/m/machlang.htm#:~:text=Machine%20lan
guage%20example,the%20text%20%22Hello%20World.%22&text=Below%20is%20anot
her%20example%20of,times%20to%20the%20computer%20screen.
https://www.computerhope.com/jargon/a/al.htm#:~:text=Programs%20written%20i
n%20high%2Dlevel,JavaScript%2C%20Clojure%2C%20and%20Lisp.
https://www.britannica.com/technology/fourth-generation-language
https://www.geeksforgeeks.org/differences-between-procedural-and-object-
oriented-programming/
https://www.geeksforgeeks.org/how-to-write-a-pseudo-code/
https://www.computertaleem.com/problem-
analysis/#:~:text=changes%20before%20completion.-
,Problem%20Analysis%20in%20Computer%20programming%20is%20the%20process%2
0where%20we,discussed%20for%20giving%20the%20solution.
https://pediaa.com/what-is-the-difference-between-system-flowchart-and-
program-
flowchart/#:~:text=The%20main%20difference%20between%20system,flowchart%20r
epresents%20a%20single%20program.&text=One%20such%20diagram%20is%20a,mo
del%20to%20a%20given%20problem.
DRJNA20 Page 13
DRJNA20 Page 14