CISP457 Practice Midterm 2
Instructions:
You may bring any material that is handwritten or printed prior
to the examination to help you. You can also bring a calculator if you
think it may help you. However, you can only use the calculator for
numerical computations only.
You, as an individual, are expected to do your own work. This means
you cannot seek, receive or otherwise acquire any assistance except
clarifications from the professor during an examination. Any communication
involving the contents of the subject matter or the examination is
considered cheating. Do not initiate or accept such communication,
or the result of your examination is automatically voided.
Each correct answer is worth one point, each
wrong answer is worth -0.25 point, and each unanswered question is
worth zero point.
Make sure you write down you name on the upper right corner first,
otherwise I cannot give points to anonymous students!
The baseline is 10, there are 12 questions.
- In this flowchart, what must be true when we arrive at the
``end'' terminator?
-
-
-
-
- none of the above can be guaranteed
- Observe the pseudocode.
If has a value of 24, and has a value of 20 before this code,
what will be the new value of after this pseudocode?
- 24
- 25
- 48
- 23
- 12
- Observe the following decision table:
|
|
op1 |
op2 |
op3 |
T |
T |
X |
X |
|
T |
F |
X |
|
X |
F |
T |
|
X |
|
F |
F |
X |
X |
X |
As per our usual notation, ``T'' means true, ``F'' means false,
``X'' means the action is taken.
Assuming a system is implemented as specified, and all of
``op1'', ``op2'' and ``op3'' are performed, what do we know about
, and ?
- and
- and
- and
- and
- and
- Choose one representation of logic that is not graphical.
- Pseudocode
- Activity Diagram
- State Diagram
- Flowchart
- Decision Tree
- Assume that we are in state S2. Which trigger or triggers
must have occured?
- t1
- t2
- t3
- t1 and t2
- none of the above is guarranteed
- To what type of construct are guard conditions associated?
- state in a state diagram
- step (state) in an activity diagram
- transition in a state diagram or activity diagram
- relationship in a class diagram
- generalization in a class diagram
- Analyze this class diagram. Given that I have 30 objects of
``Class_2'', and 23 objects of ``Class_4'', what is the minimum
number of objects of ``class_3''?
- 30
- 23
- 53
-
- 1
- Given independent conditions, there are possible
combinations
in a decision table. What if we are given the conditions as
follows: and ? How many possible combinations
are there?
- 0
- 1
- 2
- 3
- 4
- Read the class diagram. If an object of ``Class_7'' is deleted,
objects of what other classes must be deleted as well?
- only Class_5
- only Class_6
- only Class_8
- only Class_5 and Class_6
- Class_5, Class_6 and Class_8
- Which diagram type allows data flow as a construct?
- Activity diagram
- Class diagram
- Sequence diagram
- State diagram
- Use case diagram
- Which diagram type is suitable when we need to document how a
passive object responses to external triggers?
- Activity diagram
- Class diagram
- Sequence diagram
- State diagram
- Use case diagram
- What is wrong with the following activity diagram?
- there is no problem with it
- triggers are mandatory
- guard conditions are mandatory for all transitions
- we cannot tell whether Action_State_2 will transition to
Action_State_3 or Action_State_4
- we cannot tell whether Action_State_4 will transition to
Action_State_2 or Action_State_3
Copyright © 2005-04-18 by Tak Auyeung