In a UML class diagram for a high-school timetable, Section and Student are joined by an association. The multiplicity beside Student is 20..35 and the multiplicity beside Section is 1..6. The school plans to run 48 sections. What is the minimum number of Student objects that lets every section meet the lower bound of its range? Answer as a whole number.
Unlock full course notes by signing up
Counting members and visibility in class boxes
The class diagram for a vehicle-tracking program is written out below, one class per row. Members in the same compartment are separated by semicolons. Truck is a subclass of Vehicle.
Count only the members drawn in each box. Inherited members are not repeated in a subclass box, and a constructor counts as an operation. Complete the table with whole numbers.
Diagramming an interface, a field and a parameter
Consider the Java code below, where Customer and Printer are classes defined elsewhere in the same program. When each relationship in this code is drawn as a line on the class diagram, which statements are true? Select all that apply.
Java keywords behind abstract, static and read-only notation
When you turn a UML class diagram into Java, several pieces of notation each map to a single Java keyword. A class whose name is set in italics cannot be instantiated directly, so it becomes a class declared with the keyword ________. An attribute or operation shown underlined belongs to the class itself rather than to each object, so it becomes a member declared with the keyword ________. An attribute followed by the property {readOnly}, whose value cannot change once it is set, becomes a field declared with the keyword ________.
Object counts allowed by a one-to-many multiplicity
A company's staff records are modelled by the UML class diagram below. The association between Department and Employee has multiplicity 1 at the Department end and 3..8 at the Employee end.
Using only the constraints in the diagram, find:
the minimum and the maximum total number of employees when the company has exactly 5 departments;