Revision Guide
By Tom
Declarative programming
The computer is given a set of facts...
...And a Goal
This finds all members with 2G
In this case Results are;
John, Val, Don
A declarative language doesn’t need a set of instructions...
...It is capable of deciding how to solve the problem
Predicate logic
This finds all Male members.
In this case Results are;
John, Hal, Don
In this case Results are;
The Computer searches it’s facts in order, if it finds a non
matching result,...it has to return to the original search
criteria and start over. This is Backtracking
Object Oriented Programming
OOP relies on objects in the real world being classified
This is a Class
Objects can only provide data from within a Class. This is called
data encapsulation
Sub-Classes Are Objects
Object Oriented Programming
Super class because other classes can
access data from it and vice versa.
Sub Classes are called derived classes. The derived classes have
inherited data from the super class.
Unified Modelling Language
Object-oriented languages are complex languages and methods have had to be
developed which can be used to define and explain the solutions that are produced
This methodology for planning and explaining object-oriented programming is called
the Unified Modelling Language (UML)
UML consists of a number of descriptive diagrammatic representations that describe the stages required to produce
object-oriented programs
You don’t need to worry too much about UML, you only need to be able to understand
diagrams and interpret them
Object & Use case Diagrams
Shows what is happening in a system rather than
how it is done.
Users are depicted outside the box and processes over which they
have some control are shown and linked with the box
This sort of diagram shows the attributes
for specific objects from a class
State & Activity Diagrams
Activity diagrams are like flowcharts showing how the logic
behind the work has developed
Shows the state of an object through the