Worksheet
»
|
-
(i) TRUE;
(ii) TRUE; (iii) FALSE, they are instance of the type 'Maintenance train'.
-
Class
attributes are normally private so that only the operations belonging to
the class can manipulate the attributes since it is only they that
'understand' the attributes. In order to ensure system reliability,
it is important that other classes do not directly 'interfere' with the
attributes of another class as they may set them to invalid values or fail
to maintain internal consistency rules that are only known to the class's
own operations.
-
(i)
FALSE; (ii) TRUE; (iii) FALSE
-
You would
make an attribute of a class a separate class by itself if you wanted to
record information about the attribute independently of the original class
to which it belonged. For example, if you had an attribute called
person's name, as an attribute of a class called 'bank account', the
person's name would become a class in its own right (such as 'Person') if
you wanted to record information about people, irrespective of whether
they held a bank account.
-
The
stereotype <<extend>> is used to special extensions to a use
case (e.g. optional processing).
-
Answer 1
is correct.
-
To
calculate the completeness of the rules, you must take 2 to the power of
the number of conditions (2 ** 3 = 8). Because you have some
'blanks' in the rules (hyphens or dashes), you must compensate for the
fact that every dash represents two rules. Thus in rule number 1,
you actually have 4 rules as there are 2 dashes, which together with the
remaining 3 rules, makes a total of 7 rules in the table. You are
therefore one rule short (N-Y-N).
|
|