1.2.4 Types of Programming Language Flashcards
what is a paradigm?
to describe an example of a way of doing things
what does Turing complete mean?
a computer language that can solve all the problems a computer is able to solve
why do we need different paradigms?
some problems are better suited to being solved using a certain paradigm
what are the characteristics of machine code?
- least abstract
- closest to what actually happens in computer
- programs in 1s and 0s
- translated into electrical signals
what are the characteristics of assembly language?
- uses mnemonics
- each mnemonics matches a specific binary code
- one to one relationship
- translated by an assembler
what are the characteristics of high-level languages?
- can go further than machine and assembly
- one-to-many relationship - each instruction is equivalent to many lines of machine code
- so much more complex so are high level
what are the two categories of high level languages?
- imperative
- declarative
what are the characteristics of imperative languages?
- uses statements which change a program’s state (eg. sequence, selection, iteration)
- consists of commands for a computer to complete
- focus on how a program operates
what are the characteristics of a declarative language?
- focuses on what the program should accomplish
what are the two paradigms under imperative languages?
- object oriented
- procedural
what is the characteristic of procedural programming?
program is builds from one or more subroutines
what is the characteristic of object oriented programming?
modular approach to programming
what are the advantages of machine and assembly?
- assembly has the same efficiency as machine as it is a one to one relationship
- it can produce very precise, locally optimised and efficient code
- it provides direct access to system level features - improves speed
- complete control of code
what are the disadvantages of machine and assembly?
- machine dependant and very hard to port
- rare to find efficient assembly coders
- very tedious and prone to bugs
- difficult to understand
what features do procedural languages have?
sequence, selection, iteration
what features do oop have?
sequence, selection, iteration
+ inheritance, objects, classes and encapsulation
how is data stored in procedural languages?
local or global variables
accessible through parameter passing
how is data stored in oop?
attributes and concealed from other parts of program through encapsulation
what is the program structure for procedural languages compared to oop?
- procedures and functions
- classes, methods and instances
what is the program logic for procedural languages compared to oop?
- expressed in a series of procedure calls
- based on models and behaviours