|
My examination questions in software engineering may also reflect
social concern.
Here is a sample examination question during the SARS epidemic in 2003:
|
Question
5
There are two reasons why lifts are likely to transmit the SARS virus:
-
Lift buttons may be contaminated.
-
Lifts may be overcrowded.
The Medical Council proposes the following system to avoid these
problems.
Model the proposal using state machine(s).
-
There will be no button in lift lobbies or inside lifts.
-
On arriving at the lift lobby, passengers key in "168" to their
mobile telephone.
-
The telephone displays "please wait" on the screen, and sends a
signal to the lift controller, which includes a lift request and
the mobile telephone number.
-
The lift controller sends a signal to the mobile phone asking for
the floor number to go to.
-
The mobile phone displays "please enter floor number".
-
The passenger keys in the floor number followed by "#".
-
On receiving each digit, the telephone displays it on the screen,
and sends a signal to the lift controller, which includes that
digit and the mobile telephone number.
The treatment for the "#" key is similar.
-
After the "#" signal has been received, the lift controller
regards the entered floor number as complete.
Sometimes, however, a passenger may forget to enter "#".
If the lift controller does not receive any more digit for one
second, it will also regard the entered floor number as
complete.
For example, both "12#" and "12" followed by one second without
signal will be regarded as the 12th floor.
-
A floor number "0" is treated as the ground floor.
A "#" signal without any floor number is also treated as the
ground floor.
No signal at all for one second will similarly be treated as the
ground floor.
-
The lift controller then sends a signal to the mobile phone
asking the number of people travelling together.
-
The mobile phone displays a message "please enter number of
passengers".
-
The passenger keys in the number of passengers followed by "#",
or the number of passengers followed by one second without
signal, in a way similar to (g) and (h) above.
-
If the number of passengers is "0", it is treated as a
cancellation of request.
A "#" signal without any number is also treated as a
cancellation.
No signal at all for one second will similarly be treated as a
cancellation.
-
The lift controller selects a lift with sufficient room for the
specified number of passengers, and sends the lift number to the
mobile telephone.
-
The mobile telephone displays the lift number on the screen.
In this way, passengers do not touch any lift button.
Passengers will not squeeze into an overcrowded lift because the
capacity is carefully controlled.
The SARS transmission problem is therefore reduced, and people live
happily ever after.
|
|
|
|
|