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

Lis 109

The document discusses types of programming languages, levels of programming languages including machine language, low-level language, high-level language, interpreted language and compiled language. It also discusses programming paradigms including procedural programming and object-oriented programming. Finally, it outlines the steps in program development including understanding the problem, developing the solution, coding, testing, documentation and maintenance.

Uploaded by

Venise Mangilit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Lis 109

The document discusses types of programming languages, levels of programming languages including machine language, low-level language, high-level language, interpreted language and compiled language. It also discusses programming paradigms including procedural programming and object-oriented programming. Finally, it outlines the steps in program development including understanding the problem, developing the solution, coding, testing, documentation and maintenance.

Uploaded by

Venise Mangilit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

LIS 109 – Programming Fundamentals

LESSON 1 & 2
Types of Programming Languages
Definition of Terms
• Computer understands program only if it is coded in
Computer Program – are set of instructions written in a its machine language.
programming language that a computer can execute, • Because the computer can only understand machine
programs are designed to perform specific tasks. language instructions, programs that are written in a
high-level language must be translated into machine
Computer Programmer – refers to the person who designs or language.
creates, codes, tests, debugs and documents a computer • Once a program has been written in a high-level
program. Programming requires more than just the knowledge language, the programmer will use an interpreter or a
of a programming language. In effect, programmers spend compiler to make the translation.
most of their time in planning solutions before they start
writing the source code for the program. Interpreted Language

Computer Programming – the art and science of designing a o A program written in an interpreted language can be
program, it is the process of providing instructions for the run immediately after you finish writing it or, while you
microprocessor. The stages of programming include design or are writing it. But such a program always needs an
making decision about what the program should accomplish; interpreter to translate the high-level instructions into
and coding refers to the use of a programming language to machine-understandable instructions at runtime.
express the program’s logic in computer-readable form. o You cannot run the program on a machine unless the
right interpreter is available. Programming language
Levels of Programming Languages like python, ruby use interpreters.

Machine Language Compiled Language


- native tongue
- each machine language instruction is a binary string of o A compiler is needed to translate a program written
0’s and 1’s that specifies an operation and identifies the in a compiled language into machine-
memory cells involved in the operation. understandable code (binary code) before you can
Low-level Language run the program on your machine.
- provides little or no abstraction from a computer's o When the translation is done, the binary code can be
instruction set architecture saved into an application file. You can keep running
- it uses mnemonics or symbols to represent instructions
the application file without the compiler unless the
and data
program (source code) is updated and you must
- does not need a compiler or interpreter to run; the
recompile it. Programming language like C, C++ use
processor for which the language was written is able to run
compilers.
the code without using these
High-level Language Interpreter Compiler
- uses statements like words and symbols of the English
- Translates program one - Scans the entire program
language, when these languages are used a
statement at a time. and translates it into
compilation run is required before data can be processed.
- It takes less amount of machine code.
- the program that is written in a high-level language is
time to analyze the source - It takes large amount of
called the source program, and its translation in machine
code, but the overall time to analyze the source
language is called object program.
execution time is slower. code, but the overall
*Cobol, Visual Basic, Java etc.
- No intermediate object execution time is
code is generated, hence comparatively faster.
are memory efficient. - Generates intermediate
- Continues translating the object code which further
program until the first error requires linking, hence
is met, in which case it requires more memory.
stops. Hence debugging is - It generates the error
easy. message only after
scanning the whole
program. Hence debugging
is comparatively hard.
LIS 109 – Programming Fundamentals
Whitebox Testing - testing the program by assuming
everything about the program, making sure that
Programming Paradigms
every instruction and every possible situation has
Procedural Programming been tested

o uses a list of instructions to tell the computer what to 5. Program Documentation - When the program is finished

do step-by-step and tested, the documentation on the program is included for

o relies on procedures, also known as routines or its distribution. It usually includes necessary information about
subroutines the requirements of the program like operating system and
o known as top-down languages hardware requirements needed for the program to run. It also
o Fortran, COBOL and C, which have been around since contains technical information such as who created the
the 1960s and 70s program, who to contact when there’s a problem and
instructions on the use and maintenance of the program.
Object-oriented Programming
6. Maintenance - this final stage in programming is
o is an approach to problem-solving where all maintaining or updating the program. This is where the
computations are carried out using objects programmer is tasked to keep the program running smoothly
o an object is a component of a program that knows and updated with the developments and changes in the field
how to perform certain actions and how to interact where it is used
with other elements of the program
o is like a procedure in procedural programming
o C#, Java, Perl and Python

Steps in Program Development


LESSON 3
1. Understanding the Problem – the first step is to get a clear Definition of Terms
idea of what you want to do. You need to know what kind of
Program Logic Formulation
input to expect, how the input is to be processed, and what
kind of output is required • Computers are logical machines. They follow
instructions down to the letter. Although computers
2. Develop the Solution - to solve the problem, you will need
perform accurate calculations or computations,
detailed plans, a plan of what is to be done and when,
computers cannot think and therefore cannot correct
enabling us to develop the logic of the program. Ex. Algorithm /
wrong instructions. For the intention to be achieved, a
Pseudocode, Flowcharts, and Structure charts
program must be designed carefully before they are
3. Implementation - given the detailed design of the solution, created or written.
this process involves writing the source code. If a program is • Program logic formulation provides the tools needed
large, you’ll write the source code one unit at a time. Each part to design the right solution by helping you define and
will be based on the detailed design specifications, and you’ll identify the problem, its requirements and the needed
verify that each piece works, as much as you can, before instructions.
proceeding. In this way, you’ll gradually progress to a fully
Example tools are; Algorithm and Flowchart
working program that does everything you originally intended
Algorithm and Flowchart
4. Testing - The process of finding and correcting errors in your
program or sometimes refer as debugging. Bug is used to refer Algorithm - is a list of steps for solving a problem. It requires
to any error in a program it involves tracing where the you to write step-by-step procedures and then verify that it
information went and how it was processed. The jargon for this solves the problem as intended. This is often the most difficult
phase of program development is integration testing part of the problem-solving process. To design the solution for
a problem using an algorithm, programmers use a method
o Types:
called top-down design (also called divide and conquer)
Blackbox Testing - testing the program
without knowing what is inside it and without knowing Steps:
how it works. Test plans are developed by looking only
1. Initialize data.
at requirements statement and then be used when
the system is tested as a whole 2. Read/input the data.
LIS 109 – Programming Fundamentals
3. Perform computations. complex programs and eliminate
unnecessary things
4. Display/output results Flow Directions Indicators
- are used to show the direction of
Flowchart - a diagrammatic or graphical representation that
processing or data flow
illustrates the sequence of operations to be performed to get
Arrowheads
the solution of a problem. Flowcharts are generally drawn in
Off-page Connector
the early stages of formulating computer solutions; it
- used instead of the on-page
facilitates communication between programmers and connector to designate entry to or
business people. Flowcharts are visual representations of an exit from a page when a flowchart
algorithm. In creating flowcharts, we use the special symbols requires more than one page
that represent specific functions performed by a computer. - commonly used in complex
flowcharts, which often require a
Flowcharting Symbols detailed diagram Pentagon
Flow line
Input or Output
- used to show reading order or
- Asks for data, either input or
sequence in which flowchart
output
symbols are to be read
Parallelogram
- flow lines are sometimes drawn
Processing
with arrowheads. The commonly
- represent a group of program
accepted practice is to indicate an
instructions that perform a
arrowhead if the logic flow is from Horizontal/Vertical
processing function of the program Rectangle
right to left or from bottom to top. Lines
Decision
- denotes a point in the program
where more than one path Guidelines for Preparing a Flowchart
can be taken
- used to document points in the 1. A flowchart always begin with START and is completed by
program where, based upon END symbol;
variable conditions, a branch to
alternative paths is possible. Diamond 2. Symbols are interconnected using arrows;
Preparation
3. Use comma (,) to separate data, and use semi colon (;) to
- used to represent an instruction or
separate instructions;
group of instructions that will alter,
or modify operations Hexagon
4. The arrow’s head indicates the direction to be followed;
Terminal
- used to designate the beginning 5. All the symbols except the diamond may have only one
and the end of a program, or a arrow branching out, but may have one or more arrows
point of interruption Oval branching in;
Pre-defined Process
- specialized process symbol that 6. Whenever circles are used, the symbol leading to circle
represents a named operation or should flow to the symbol where a circle containing a similar
programmed step not explicitly character is leading to;
detailed in the program flowchart.
- it can be used when a procedure Rectangle with 7. The sequence of procedure using symbols matters because
needs to be repeated several times. vertical bars it indicates the logical steps to be followed;
On-page Connector
8. A flowchart may contain many symbols of the same kind
- a non-processing symbol, which
is used to connect one part of a depending on the solution of the problem;
flowchart to another without
9. There may be many types of flowcharts to solve one
drawing flow lines
problem, but the simplest flowchart is advisable and most
- denotes an entry or an exit from
efficient.
another part of the flowchart
- conserve space by keeping
related blocks near one another,
reduces the number of flow lines in Circle
LIS 109 – Programming Fundamentals
Flowchart Development

Sequential - Steps are performed in strictly sequential manner;


each step being executed exactly once. This is the simplest
method of control. It is easy to develop and understand. The
following problems in flowcharting illustrate simple logic flow.

Selection - the execution of instructions by selection, wherein


conditions for a series of alternative statements are evaluated
to specify which instruction is to be executed.

You might also like