OCR Computing A-Level Revision

UML (3.6.d)

This section is accompanied by an official OCR resource.

UML is used to plan, construct, and document object-oriented software projects. It is a standard way of blueprinting various elements in an easy to understand, visual manner. Because it is standardised, it makes system maintenance and modification easier, and aids communication between different people within the process of creating software.

Diagrams (3.6.e, 3.6.f)

Class Diagram

A class diagram

When a class shares attributes and methods, a superclass should be used (to avoid duplication). The derived classes inherit all the attributes and methods of the superclass.

A class diagram with repeated attributes and methods, using a superclass

Object Diagram

You need to be able to create an object diagram from a class diagram (see above).

An object diagram

An anonymous object is any object from a specific class (but no particular object).

An anonymous object diagram

Use Case Diagram

A use-case diagram shows how different types of users interact with the system. Initiating actors give input while receiving actors receive output.

A use case diagram

You will be penalised if you use arrows because use case diagrams do not show order.

Communication Diagram

Communication diagrams show how different objects combine to carry out a task.

A communication diagram

Note: you will not have to draw these types of diagram (only interpret them or explain the symbols used):

State Diagram

State diagrams show how an object will behave through the various processes of the system. The circle at the start of the system is known as the entry point, and the end of the system is known as the exit point. The arrows between the states are known as triggers (and should be labelled).

A state diagram

Below is a simplified state diagram:

A simplified state diagram

Sequence Diagram

Sequence diagrams show how objects interact with each other. The line showing the length of time an object exists in the process is known as the lifeline

A sequence diagram

Warning: sequence diagrams can be extremely complex!

Activity Diagram

Full Description Simple
Starting Point Starting Point Simple Starting Point
Activity Activity Simple Activity
Decision Decision (two options) Simple Decision
Input and / or Output Input & Output Simple Input and / or Output
Parallel Activities More than one activity being done at once simple parallel activities
End Point End Point Simple End Point

An activity diagram

Below is a simplified activity diagram:

A simplified activity diagram