Please enable JavaScript.
Coggle requires JavaScript to display documents.
INTRODUCTION TO PROGRAMMING - Coggle Diagram
INTRODUCTION TO PROGRAMMING
Programming Paradigms
Logic
Focus on facts stored in memory called the knowledge base
Advantage
Proving the validity of a
given program is simple
A set of sentences in logical form, expressing facts and rules about some problem domain
Examples
LISP
ProLog
Object-oriented
based on objects and classes
Programmer identifies objects which are items that can contain both data and the
procedures that read ormanipulate that data
Advantages
Code reusability
Avoid programming redundancy
Examples
C++
Java
Procedural
based on the concept of modular
programming.
Programmer identifies the major function of a
program called the main module and the main
module is divided into smaller modules.
Advantages
It makes the program more readable and easier to maintain
It can reuse the code.
Examples
C
Pascal
Programming Language
Low-level language
Machine Language
Disadvantages
difficult to learn and understand.
it can only be used on the machine it is
originally created for
Advantage
readily understood by the computers because it does not need to be translated before being executed
language that consists of strings of binary digits (1 and 0) to represent instructions to computer.
Assembly Language
consists of English-like abbreviations,
called Mnemonics, to represent instructions to computer
Disadvantages
needs to be translated into machine language before being executed
not readily understood by computers
Advantage
easier to learn and understand
compared to machine language.
consists of strings of binary digits or English-like
abbreviations to represent basic instructions to a computer
A set of words, symbols and codes that enables
programmer to give instructions to a computer
High-level language
Definition
Consists of a series of English like words to represent instructions to computer.
Examples
Java
C++
Pascal
Advantages
easier to learn and understand
compared to low-level languages
machine-independent; it can run on different types of computers and operating systems.
Disadvantage
not readily understood by computers where it needs to be translated into machine language before being executed
Program
A set of instructions that tells a computer to perform tasks and instructions must be written in a way that the computer can understand.
Programming Languages Translators
program that translates programming source code into machine language.
Assembler
Translates high-level programming language into machine language one
line at a time.
Compiler
Translates the entire source code of high-level programming language into
machine language
Interpreter
Translates programs written in assembly language into machine language.