Question 9 Flashcards
1
Q
What is the probable content of this exam question?
A
(1) Metrics calculation and testing.
2
Q
Calculate the cyclomatic complexity of the code extract in question 9 of the specimen exam paper. Show briefly how you arrived at your answer.
A
1 (straight through) + 1 (for) + 1 (if) + 1 (&&) = 4
3
Q
In test-driven development, what steps do you need to carry out before you write the code that implements an operation?
A
(1) Decide on code increment.
(2) Decide on test.
(3) Write the test.
(4) Run the test assuming failure.
(5) Only then, write the code.