COURSES : ALGORITHMS AND PROGRAMMING
MATERIAL : INTRODUCTION TO ALGORITHMS AND PROGRAMMING
MEETING SESSION : 1 (ONE)
A. INTRODUCTION
Today technological developments, the computer is a tool that plays a very
important role. In accordance with its function, the word "computer" comes from
the word "compute," meaning "calculation, so that every process carried out by
the computer is an arithmetic calculation. Computer technology is divided into
three parts, namely hardware (hardware), software (software), and users
(user/brainware). Hardware is a type of computer device that can be physically
touched, such as a keyboard, monitor, mouse, hard drive, and so on. Software is
a computer program that functions as a means of interaction between the user
and the hardware.
Computers work using the binary number system, namely 0 (zero) and 1 (one).
This will make it difficult for programmers (people who create software) to create
software. Therefore, a programming language appears that is used to facilitate
giving instructions to machines (computers). Programming is a technique used to
utilize a computer device so that it can function to help solve problems faced by
humans.
B. PROGRAM
A program is a collection of computer instructions, while the systematic methods
and steps in a program are algorithms. A program (or "programming is a collection
of separate instructions, which are usually called source code and are made by
programmers (program makers). A variable is an identifier that is used to
represent a certain value in the program process. In contrast to constants, whose
value is always fixed, the value of a variable can be changed as needed. To obtain
the value of a variable, an assignment statement is used. Since the program is
written using a programming language, it can be concluded that the program is
an implementation of a programming language.
The programming paradigm is:
1. Procedural programming
• Based on sequences, sequential
S E S S I O N 1 Algorithms and Programming | 1
, LECTURER NOTES
• A program is a series of procedures to manipulate data. A procedure is a
collection of instructions that are executed sequentially.
2. Functional Programming
• Based on the theory of mathematical functions
• Function is the main basis of the program.
3. Structured Programming
• Structured and sequential.
• Programs can be divided into procedures and functions. Example: PASCAL
and C
4. Modular Programming
• This programming consists of many modules.
• A module is a collection of stand-alone procedures and functions. A
program can be a collection of modules. Example: MODULA-2 or ADA
5. Object-Oriented Programming
• Programming based on object principles, where objects have data,
variables, properties, and methods, events, and procedures that can be
manipulated. Example: C++, Object Pascal, and Java
6. Function-Oriented Programming
• This programming focuses on a certain function only. Example: SQL
(Structured Query Language)
7. Pemrograman Deklaratif
• This programming describes a problem with statements rather than
solving the problem by implementing an algorithm. Example: PROLOGUE
The following stages are involved in the creation of the program:
1. Define the problem.
Determine the problem, what must be solved using a computer, and
determine the input and output.
2. Find a solution.
The next step is to determine a solution. If the problem is too complex, it is
better if it is broken down into small modules to make it easier to solve. For
example, the matrix inverse problem can be divided into several modules that
ask for input in the form of a square matrix, look for matrix inverses, and
display the results to the user.
3. Choose an algorithm.
Choose an algorithm that is truly appropriate and efficient for the problem.
4. Write programs.
S E S S I O N 1 Algorithms and Programming | 2