1. Imperative: Using Procedures and languages such as Pascal for instance.
- Uses and Defines Mathematical functions
- For a problem to be solved it consists of a number of function calls
- No Variables
- There's no specific list of commands
- Consists of a set of facts and rules, example being 'Prolog'
4. Event Driven: Instead of the program being executed in order the programmer designed, subroutines are executed in response to events such as a mouse click.
5. Object Orientated:
- Uses Reusable code
- Puts subroutines etc.. into a single unit called a class
- When a programmer uses a class they declare instances of the class called objects.
Object Orientated Programming
An Object: An instance of a class which is a self contained entity characterised by its properties
Instantiation: An object is defined based on a class
Class Definition: A template that can be used to create objects of that class
- Properties are contained within e.g Procedures and Functions.
- They are good as you can share code easily and easy to maintain and modularity.
Inheritance: From a base class you can create sub-classes which inherit all the properties of the base class