1.2.4. Types of Programming Language Flashcards
What are programming paradigms?
different approaches to using a programming language to solve a problem
What are the 2 broad catagories which programming paradigms are split into?
- imperative - declarative
What are 2 advantages of procedural programming?
- can be applied to a wide range of problems 2. relatively easy to write and interpret
Whate are 2 uses of declarative programming?
- expert systems 2. ai
What are the 4 main structures used in structured programming?
- sequence 2. selection 3. iteration 4. recursion
How does assembly language differ from machine code? (2 things)
- 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?
to store the value in the accumulator at the given memory address
What is the function of the BRP mnemonic? (2 things)
- to branch to a given address if the value in the accumulator is positive 2. it is a conditional branch
What is the function of the opcode? (2 things)
- to specify the instruction to be performed and the addressing mode - the operand holds a value, related to the data on which the instruction is to be performed
What are the 4 addressing modes?
direct addressing indirect addressing indexed addressing immediate addressing
What is a class? (2 things)
- a template for an object that defines the state and behaviour of an object - on object is an instance of a class
What are 2 disadvantages of object orientated languages?
- requires a different style of thinking, which can be difficult for programmers accustomed to other paradigms to pick up 2. generally unsuitable for smaller problems