PROBLEM SOLVING 1 0 INTRODUCTION TO PROGRAMMING Prepared

PROBLEM SOLVING 1. 0 INTRODUCTION TO PROGRAMMING Prepared by : Pn Nurul Zakiah Kasnun @ IT Department


DEFINITION OF PROGRAM, PROGRAMMING AND PROGRAMMER Program: n A set of step‑by‑step instructions that directs a computer to perform a specific task and to produce the required results. Programming: n Programming is a process of designing/ creating a program. Programmer: n Programmer is a person who writes the program.

PROGRAMMING LANGUAGE Definition: n A set of rules and reserved words (keywords) that can be used to tell a computer what are the operations to be done. n Now, there are over 200 programming languages in the world. For example: Cobol, Pascal, C, C++, and Fortran.

Cont. . PROGRAMMING LANGUAGE n How Human Interact: Interaction HUMAN LANGUAGE (BAHASA MELAYU) n How Human and Computer Interact: Interaction PROGRAMMING LANGUAGE (C, C++, COBOL)

Cont. . PROGRAMMING LANGUAGE a. n n b. n n Machine language The lowest level of language. It represented data and program instructions as 1 s and Os ‑ binary digits The only language that the computer could understand (does not require translator). Machine language is machine-dependent. Meaning, a written program for one computer generally cannot be executed on another. For example, a program written in Apple PC cannot be run in IBM PC. Assembly Language Known as symbolic language. It was developed to replace "0" and "1" used in Machine Language. It uses mnemonic codes - A represented ADD and S represented SUM Computer does not understand the language so it needs an assembler to translate the program to machine language.

Cont. . PROGRAMMING LANGUAGE n High Level Language Instruction is written as a series of English-like words. Translator (Compiler/Interpreter) is needed to translate high level language to machine language. It is Machine-Independent. The program can be written and executed on any computer. E. g. Fortran, COBOL, SQL, PROLOG, C d. Object-Oriented Programming c. n n n E. g. C++, Java

Differentiate the Programming Language n Advantages / Disadvantages (if any)
- Slides: 8