1.2.4 TYPES OF PROGRAMMING LANGUAGE Flashcards
What are programming paradigms?
different approaches to using a programming language to solve a problem
which two broad categories are programming paradigms split into?
imperative
declarative
State the advantages of procedural programming
- can be applied to a wide range of problems
- relatively easy to write and interpret
state a use of declarative programming
- expert systems/knowledge-based systems
- artificial intelligence
identify the four main structures used in structured 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
what is the function of the 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 if 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 a value which is related to the data on which the instruction is to performed
state four addressing modes
- immediate addressing
- direct addressing
- indirect addressing
- indexed addressing
what is a class?
a template for an object that defines the state and behavior of an object . An object is an insurance of a class
Give one disadvantage of Object Oriented
Languages
- 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.