Академический Документы
Профессиональный Документы
Культура Документы
Week 1
Subject at glance
Algorithm and Programming I 15 meetings Meetings will be carried out in both bahasa
http://is.gd/AlPro1_IF1A
Subject at glance
At the end of this subject, you will be able to:
distinguish various algorithm and programming
notations and programing languages choose correct usages of data types distinguish and using correct control structures distinguish correct usages between procedure and function in an algorithm. using pointers in algorithm and program development
Subject at glance
Textbooks:
Algoritma dan Pemrograman dalam Bahasa
Pascal dan C (Rinaldi Munir) Pemrograman C++: Membahas Pemrograman Berorientasi Objek Menggunakan Turbo C++ dan Borland C++ (Abdul Kadir Heriyanto)
Subject at glance
Markings system
No. 1. 2. 3. 4. 5. Markings Percentage Attendance and 5 punctuality Quizzes 15 Assignments 10 Mid-Sem Exam 30 Final Exam 40
No. 1. 2. 3. 4. 5.
Grades A B C D E
Range 85,55 100 70,55 85,54 55,55 70,54 40,55 55,54 < 40,54
Todays coverage
Definitions of Programming Definitions of Algorithm Terms in Algorithm and Programming
Introduction
Computers is used to help human solve their problem But to get computer to solve your problem can be
a problem :/
it cant be solve as it is computer is a machine, therefore it only knows machine language There should be a language that is known to both
Programming: Introduction
Programming
has to based on a full comprehension over a
problem, analysis, and synthesis. Its not a trial and error process
Programming: Paradigm
Procedural/Structured/Imperative Functional Declarative/Predictive/Logical Object Oriented
Programming: Language
Procedural: Algol, Pascal, Fortran, Basic, Cobol, C Functional: LOGO, APL, LISP Declarative/Predictive/Logical: Prolog Object Oriented
pure OOP: Smalltalk, Eifel, Java hybrid: C++, Object Pascal
Programming: Language
From this point onwards, well be using C/C++ why?
Programming: on Learning
Learning programming language wont be the same
syntaxes, instructions, and how to use compiler on a computer learning how to program is related to problem solving strategies and how to express it into a structured notation
Programming: Logics
Is similar to computers
CPU
Processor Control Unit
Input device
Output Device
ALU
Input
Process
Output
compiled
hi lvl language
assembler language
data
1
11
12
13
14
15
16
17
18
19
MEMORY
21
22
23
24
25
26
27
28
29
PROCESSOR ALU
program
1
M O V M O V
22 23 12 13
A H , 9
16 17 27 26
11
14 24
15 25
18 28
19 29
21
MACHINE LANGUAGE
Algorithms
Execution
Compiler: - Turbo C++ - Borland C++ Builder - Turbo Pascal - Turbo Basic - Visual Basic Interpreter: - Basica - Dbase III++ - Java
Algorithm: Introduction
Definitions
logical steps to be taken to solve a problem domain According to Kamus Besar Bahasa Indonesia
Algorithm: Origin
First implemented on Webster Dictionary in 1957,
the word Algorism is derived from Abu Jafar Muhammad ibnu Musa al-Khuwarizmi. The founder of this field of study
Algorithm: Usage
to command computers!
Algorithm: Example
switch!
Algorithm: Example
switch!
Finiteness
it has to stop at one point it has to be well defined it can have one ore more inputs before executed it can have one or more outputs it has to be effective
Definiteness
Input
Output
Effectiveness
Algorithm: in writing
Can be expressed in 3 ways:
natural language
daily conversational language can be ambiguous
flow chart
visually descriptive things can get complicated
pseudo-code
almost identical to programming language not everyone can understand..
number; namely x Read users input number If x divided by 2 and its remainder is 0, the word even will be displayed on the screen otherwise, the word odd will be displayed on the screen
Start
int X
Read X
no
display odd
End