2020 – New IEB layout for class diagrams.
Candidates offering Information Technology need to be able to read and create class diagrams. In the practical paper you read the class diagram and then code. In the theory paper you read the question and draw the class diagram.
The main components of a class diagram are:
-
The name of the class
-
The fields of the class
-
The methods of the class
NOTES:
- Your class diagram may not use “Java” words or syntax
- Don’t use double – use real
- Don’t use int – use integer
- Don’t use String – use string
- Place the data type after the variable name, not before eg “costPrice : real”
- Data types are preceeded by a colon eg “totalQuantity : integer”
- Underlining indicates that the field or method is static eg “totalSales : real“
- Call the constructor method “Constructor” eg “Constructor (d : string, q : integer, : c : real)”
- Typed methods have a return type eg “getPrice( ) : real”
- Void methods do not have a return type eg “displayLogin( )”
- Methods may or may not have parameters eg “setPrice(p : real)”
- Use “-” for private and “+” for public
- Variables that are final look like this ” + MARKUP = 75 : integer“
- When working with class diagrams, in both the practical paper and the theory paper, you may not alter the order, the names or the data types from what is specified in the exam paper
- Click here to download the handout