Please enable JavaScript.
Coggle requires JavaScript to display documents.
INTRODUCTION TO PROGRAMMING - Coggle Diagram
INTRODUCTION TO PROGRAMMING
PROGRAMMING LANGUAGES
Program
is 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 language
is defined as a set of words, symbols and codes that enables programmer to give instructions to a computer
TYPES
High-level language
Examples
FORTRAN
COBOL
C++
BASIC
Pascal
Java
High-level languages is defined as a programming language that consists of a series of English like words to represent instructions to computer
Disadvantages
Not readily understood by computers where it needs to be translated into machine language before being excuted
Advantages
Programs are shorter because a single instruction of high-level language corresponds to many operations at the machine level
Machine-independent
it can run on different types of computers and operating systems
Easier to learn and understand compared to low-level languages
Low-level language
Low-level language
is defined as a languange that consists of strings of binary or English-like abbreviations to represent basic instructions to a computer
Examples
Machine Language
Machine language
is defined as a language that consists of strings of binary digits (1 and 0) to represent instructions to computer
Advantage
Readily understood by the computers because it does not need to be translated before being executed
Disadvantages
Difficult to learn and understand
Machine-dependent
it can only be used on the machine it is originally created for.
Programs are lengthy because a single instruction of machine language corresponds to only one operation at the machine level
Assembly Language
Language that consists of English-like abbreviations, called Mnemonics, to represent instructions to computer
Advantage
Easier to learn and understand compared to machine languange
Disadvantage
Machine-dependent
it can only be used on the machine it is originally created for.
It needs to be translated onto machine language before being executed
Programs are lengthy because a single instruction of assembly language corresponds to only one operation at the machine level
Not readily understood by computers
PROGRAMMING LANGUAGES TRANSLATORS
Types
Interpreter
Translates high-level programming language into machine language one line at a time
Assembler
Translates programs written in assembly language into machine language
Compiler
Translates the entire source code of high-level programming language into machine language
Translator is defined as a program that translates programming source code into machine language
PROGRAMMING PARADIGMS
Paradigms
Object-oriented
Based on
objects
and
classes
Programmer identifies
objects
which are items that can contain both data and the procedures that read or manipulate that data
Advantages:
Avoid programming redundancy
Programmers create applications faster
Code reusability
Examples:
C++
Java
Python
Logic
Set of sentences in logical form, expressing
facts and rules
about some problem domain
Focus on
facts
stored in memory called the knowledge base
Advantages:
Proving the validity of a given program is simple
The system solves the problem, so the programming steps themselves are kept to a minimum
Examples:
ProLog
LISP
Procedural
Based on the concept of
modular
programming
Programmer identifies the major function of a program called the
main module
and divided into smaller modules
Advantages:
It make the program more readable and easier to maintain
It can reuse the code
Examples:
Pascal
ColdFusion
C
An
approach
to solve problem using some programming language