1.2.4 Types of Programming Language Flashcards
What are programming paradigms?
Different approaches to using a programming language to solve a problem
What two broad categories are programming paradigms split into?
Imperative and Declarative
State the advantages of procedural programming:
- Can be applies to a wide range of problems
- Relatively easy to write and interpret
State a use of declarative programming:
Any from:
- Expert Systems/Knowledge-based Systems
- Artificial Intelligence
Identify the four main programming structures used in structures programming:
- Sequence
- Selection
- Iteration
- Recursion
How does assembly language differ from machine code?
Assembly language uses mnemonics rather than binary. One line in assembly language is equal to one line in machine code (most of the time)
What is the function of STA mnemonic?
Storing the value in the Accumulator at the given memory address
What is the function of the BRP mnemonic?
Branches to a given address of the value in the Accumulator is positive. It is a conditional branch
State the function of the opcode and operand:
The opcode specifies the instruction to be performed and the addressing mode. The operand holds the value which is related to the data on which the instruction is to be performed
State 4 addressing modes:
- Immediate Addressing
- Direct Addressing
- Indirect Addressing
- Indexed Addressing
What is a class?
A template for an object that defines the state and behaviour of an object. An object is an instance of a class
Give one disadvantage of Object Oriented Languages
One from:
- Requires a different style of thinking which can be difficult for programmers accustomed to other paradigms to pick up
- OOP may not be suited to all types of problems
- Generally unsuitable for smaller problems