Diagnostic Quiz
Problem
1-2. Sequential Diagrams Loops
The condition can be anything that makes sense to be a terminating or non-terminating condition.

This is the correct way to show a for-loop?
Because the keyword to use is loop, not for.
This question has appeared in CS2113 AY25/26 Sem 1 Final!
1-12. Sequential Diagrams Alternative Paths
There is only
altblock in the UML sequential diagrams, there is noifblock!
1-14. Sequential Diagrams Calling Convention
The calling convention in UML Sequence Diagrams
Caller (Sender): The lifeline where the message arrow starts from.
Receiver: The lifeline where the message arrow points to.
Method: The label on the arrow (
methodName()) is the operation being called on the receiver.Parameter: Anything inside the parentheses
(param)is data being passed from the caller to the receiver.Dashed Lines: It's just at reply message. It can be
Return of control
Return values

Method m3 calls method m4 of self.
Using the convention we have defined at the beginning, we can know that
m2(f)is a method fromb.m2(f)callsm3()fromfand then callsm4()from itself.
Thus, the statement is False because its m2(f), not m3() that calls m4().
1-15. Sequence Diagrams Optional Path
Whatever path/block in the sequence diagram has its scope, the code outside the scope is not controlled by the path/block anymore. It will always be executed.
2-3. Singleton Pattern and Testability
Singleton Pattern can reduce testability?
Tips
The condition can be anything that makes sense to be a terminating or non-terminating condition.
There is only
altblock in the UML sequential diagrams, there is noifblock!The calling convention in UML Sequence Diagrams
Caller (Sender): The lifeline where the message arrow starts from.
Receiver: The lifeline where the message arrow points to.
Method: The label on the arrow (
methodName()) is the operation being called on the receiver.Parameter: Anything inside the parentheses
(param)is data being passed from the caller to the receiver.Dashed Lines: It's just at reply message. It can be
Return of control
Return values
Whatever path/block in the sequence diagram has its scope, the code outside the scope is not controlled by the path/block anymore. It will always be executed.
Last updated