1.2.4 types of programming language Flashcards
what are programming paradigms?
different approaches to using a programming language to solve a problem
which 2 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, artificial intelligence
identify the 4 main structures used in structured programming
sequence, selection, iteration, recursion
how does assembly language different 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 instructions to be performed and the addressing mode. the operand holds a value which is related to the data on which the instruction is to be performed
state the 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 is an instance 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 if programs, generally unsuitable for smaller problems