Consider the following section of simple
programming code:
Start of code
10 Print Hello
20 If Condition C1 is true, then GOTO 30; Else GOTO 40
30 Accept Input; then GOTO 50
40 If Condition C2 is true, then GOTO 50; Else GOTO 60
50 While Condition C3 is true, GOTO 10; Else GOTO 70
60 Accept Input; then GOTO 70
70 Print End of program
End of code
(a) Draw a labelled flow graph for the above source code. [2]
Flowgraph; 2 marks. 1 mark to be deducted
for any single mistake in the
diagram. No marks to be awarded for 2 or more mistakes;
(b) Based on the Basis Path Testing technique, calculate the value
of Cyclomatic
Complexity using all three methods of calculation. Ensure that all
working is
clearly shown for the three methods (e.g. predicate nodes and regions
clearly
highlighted). [3]
Regions method: the regions must be clearly
marked on the candidates
diagram for 1 mark to be awarded. V(G) = Number of Regions = 4
Predicate nodes; the predicate nodes must be highlighted in order
for 1
mark to be awarded. Predicate nodes are: 20, 40 and 50. V(G) = P +
1 = 4
Edges and Nodes: V(G) = E N + 2 = 9 7 + 2 = 4
(c) Based on the value of cyclomatic complexity calculated, derive
the set of basis
test paths. [3]
Test paths:
Path 1: 10-20-30-50-70
Path 2: 10-20-40-30-70
Path 3: 10-20-40-60-70
Path 4: 10-20-30-50-10 (any previous path)
There are other variations of paths possible. Marks are to take note
that
each path should be testing for at least one new edge, i.e. no path
should
be completely repeated in the testing of edges.
(3 marks in all. 1 mark to be deducted for each mistake)

(d) The Formal Technical Review (FTR) is a mid-development meeting
conducted
primarily to determine the existence of functional or implementation
errors in
some aspect of software. At the end of the review, all attendees of
the FTR
typically must decide between one of three outcomes. State these outcomes,
clearly also describing the conditions necessary for each outcome.
[3]
- Accept the product without further modification;
- Reject the product due to severe errors;
- Accept the product provisionally (minor errors have been
encountered and must be corrected, but no additional review will be
required).
(1 mark each)
(e) There are also several other guidelines involved in the actual
conduct of such an FTR. Write some notes on these guidelines, presenting
in some detail at least
four distinct guidelines. [4]
(As the range of guidelines are quite extensive,
a sampling of some
guidelines are presented here.)
- Between three and five people should be involved in the review.
- Advance preparation should occur but should require no more than
2
hours of work for each person.
- The duration of the review meeting should be less than 2 hours.
- The FTR should also focuses on one specific (and small) part of
the
overall software.
- Review the product, not the producer
- Set an agenda and maintain it
- Limit debate and rebuttal
- Enunciate problem areas, but dont attempt to solve every problem
noted
For one mark to be awarded for each guideline, the guideline itself
should
be reasonably complete, not single word or phrase answers. Up to four
marks to be awarded.
|