Overview of Computer Programming
Transcript of Overview of Computer Programming
-
8/14/2019 Overview of Computer Programming
1/8
Com14Fundamentals of
Problem Solving and
Programming
Overview ofComputer
Programming
-
8/14/2019 Overview of Computer Programming
2/8
What is a Programming
Language?A programming language is astandardized communication
technique for expressing instructionsto a computer. (Syntax andSemantics) - do sample coding
but regardless of what language you
use, these instructions are translatedinto machine language that can beunderstood by computers.
-
8/14/2019 Overview of Computer Programming
3/8
The Program Development
Life Cycle
Programmers do not sit down and start writingcode right away when trying to make a computerprogram. Instead, they follow an organized plan ormethodology, that breaks the process into a series
of tasks.Here are the basic steps in trying to solve aproblem on the computer:
1. Problem Definition
2. Problem Analysis
3. Algorithm design and representation(Pseudocode or flowchart)
4. Coding and debugging
-
8/14/2019 Overview of Computer Programming
4/8
Problem Definition
A programmer is usually given a task
in the form of a problem. Before a
program can be designed to solve a
particular problem, the problem must
be well and clearly defined first in
terms of its input and output
requirements.
-
8/14/2019 Overview of Computer Programming
5/8
Problem Analysis
Usually, this step involves breaking
up the problem into smaller and
simpler subproblems. (input and
output)
-
8/14/2019 Overview of Computer Programming
6/8
Algorithm design and
representation
Once our problem is clearly defined, wecan now set to finding a solution. Incomputer programming, it is normallyrequired to express our solution in a step-by-step manner.
An Algorithm is a clear and unambiguousspecification of the steps needed to solve aproblem. It may be expressed in eitherHuman language (English, Tagalog),through a graphical representation like aflowchart or through a pseudocode, whichis a cross between human language and a
programming language.
-
8/14/2019 Overview of Computer Programming
7/8
Coding and Debugging
After constructing the algorithm, it is nowpossible to create the source code. Usingthe algorithm as basis, the source codecan now be written using the chosen
programming language.Most of the time, after the programmer haswritten the program, the program isn't100% working right away. The programmerhas to add some fixes to the program incase of errors (also called bugs) thatoccurs in the program. This process of iscalled debugging.
-
8/14/2019 Overview of Computer Programming
8/8
Types of Errors (bugs)
Compile-Time Errors occur if there is a
syntax error in the code. The compiler will
detect the error and the program won't
even compile. At this point, theprogrammer is unable to form an
executable that a user can run until the
error is fixed.
run-time errors occurs when an incorrectvalue or result is run and perform
semantically.