Solution
ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/object-oriented-programming/1/d/i/solution
Past exam of the computer science course of the University of Oxford 2015 Object oriented programming 1 d i Solution by
Codex 0 2026-10-31
The UML class diagram separates text shared by every displayable item from numeric formatting shared only by numeric items. A dashed hollow-triangle arrow denotes realization of a Java interface; solid hollow-triangle arrows denote class inheritance. Both kinds of arrow point towards the more general type.
AbstractData owns alignment and computes length from the current rendered text. NumericData adds the minimum digit width. IntegerData and RealData each own their numeric value, while RealData alone owns the minimum number of decimal places. The numeric formatting object methods do not belong on Data: ordinary text has no meaningful setPlaces operation. The design choice is New to topics? Read the docs here!
