1.2.4 Types of Programming Language Flashcards
Name the 2 categories that programming paradigms can be split into.
Imperative
Declarative
What are imperative programming paradigms?
Code that clearly specifies actions to be performed
Name the 2 imperative programming paradigms.
Procedural
Object-oriented
What are the features of a procedural programming paradigm?
Can be applied to a wide range of problems
Easy to write and interpret
Written as a sequence of instructions
Instructions are carried out sequentially
What are the features of a object-oriented programming paradigm?
Suited to problems that can be broken into reusable components with simillar characteristics
Based on objects formed from classes which have attributes and methods
What are declarative programming paradigms?
States the desired result and programming language determines how best to obtain the result
Details about how result is obtained are abstracted from user
Name the 2 declarative programming paradigms.
Functional
Logic
What is the disadvantage of procedural language?
Not possible to solve all problems or may be inefficient to do so
Name the 4 main programming structures of procedural programming.
Sequence
Selection
Iteration
Recursion
What is assembly language?
Low level language of mnemonics with a one-to-one relationship to machine code
What is the function of ADD?
Adds the value at the given memory address to the value in the accumulator
What is the function of SUB?
Subtracts the value at the given memory address to the value in the accumulator
What is the function of STA?
Stores the value in the accumulator at the given memory address
What is the function of LDA?
Loads the value at the given memory address into the accumulator
What is the function of INP?
Allows the user to input a value which will be held in the accumulator
What is the function of OUT?
Prints the value currently held in the accumulator
What is the function of HLT?
Stops the program at that line, preventing any remaining code from executing