What is a programming paradigm?
It is a specific style of programming (i.e. Imperative, Concurrent and Object Oriented)
What is Imperative Programming?
A type of language used to create programs consisting of a set of commands
What are the 3 basic control structures of Imperative Programming?
What is the ‘sequence’ control structure in Imperative Programming?
When one command is executed followed by another in Imperative Programming
What is the ‘selection’ control structure in Imperative Programming?
If a condition is true then one command is executed, else if that condition is false then a different command is executed
What is the ‘iteration’ control structure in Imperative Programming?
A command is executed a set number of times
What are variables in Imperative Programming? (2)
What is ‘modularity’ in Imperative Programming?
When commands are combines into a single block of self-contained code that can be used within a program to change values of parameters passed into them
What are the advantages of ‘modularity’ in Imperative Programming? (3)
What is Object-Oriented Programming?
A style of programming allowing a program to be separated into blocks of related data, and the operations which apply to that data.
What is an ‘object’ in OO programming?
A block of related data and the operations which apply to that data, where the data can only be accessed directly by its associated operations.
What is a ‘class’ in OO programming?
A class is a blueprint for an object, and when it is defined any number of objects can be created from that class.
What must be included in a ‘class definition’ in OO programming?(2)
What is a ‘class library’ in OO programming?
A set of classes that can be used by developers as common building blocks for complex applications
Explain superclasses and subclasses in OO programming
The superclass establishes a common interface and foundation, which subclasses can inherit, modify, and append
What is ‘inheritance’ in OO programming?
This is where a subclass is created which inherits the instance variables and methods of the class above it, but can have additional instance variables and methods of its own
What is an advantage of using ‘inheritance’ in OO programming?
There is no need to repeat lines of code to define instance variables or methods, as subclasses will simply inherit these from their superclass
What is an actual parameter? What is a formal parameter?
What is ‘encapsulation’ in OO programming? (2)
What is Concurrent Programming?
A style of programming where several streams of operations may execute simultaneously, and can also communicate and interfere with one another
What are 3 potential problems that can occur in Concurrent Programming?
What is ‘Deadlock’ in Concurrent Programming?
This is when two threads are waiting for the other to finish and as a result neither does.
What is ‘Race Condition’ in Concurrent Programming?
This is when two threads are potentially racing against each other to update or access a variable
What is ‘Resource Starvation’ in Concurrent Programming?
This is where the priority given to one or more threads means that they continuously access resources which are needed for another thread.