December 1999
SE203 : SOFTWARE ENGINEERING

QUESTION 5

Total Marks: 15 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to
Question 5

(a)

Consider the following section of simple pseudo-code:

10 PRINT "Hello"
20 PRINT "This is my first program"
30 IF CONDITION C1 IS TRUE,GOTO 50;ELSE GOTO 40
40 END_OF_PROGRAM
50 IF CONDITION C2 IS TRUE,GOTO 20;ELSE GOTO 40

(i)Translate this section of pseudo-code into a .ow graph.[2 marks ]

(ii)Based on this .ow-graph,derive the value of V (G ).Show all three methods of calculation,with full working.[3 marks ]

(iii)Based on this value of V (G ),derive the basis set of test paths.[2 marks ]

Ensure that you show all steps of working used to derive your answer.

Solution:

2 marks for a correct graph,1 for a graph that is correct but has a simple mistake in the labelling or linking

value of cyclomatic complexity:3
V (G )=EDGES -NODES +2 =6 -5 +2 =3
V (G )=NUMBER OF REGIONS =3 (regions must be clearly shown on the graph)
V (G )=predicate nodes +1 =2 +1 =3
1 mark each

Basis set of test paths:
(I)10 –20 –30 –40
(II)10 –20 –30 –50 –40
(III)10 –20 –30 –50 –20 –30 –40

2 marks for complete correctness of paths,only 1 mark if one mistake is made in path,0 marks if two or more mistakes

 

[7]
(b)

Consider a data variable STATUS that is used to indicate a student ’s status in an examination.There are three possible values for STATUS :

Based on the equivalence partitioning technique,do each of the following for the STATUS data variable:

(i)Identify clearly the invalid class,and valid class of inputs.[2 marks ]

(ii)Present two test cases,one falling into the invalid class,and one falling into the valid class.[2 marks ]
Valid class of inputs:STATUS ={P ,C ,A }(1 mark)
Invalid class of inputs:STATUS =any other character (1 mark)
Example of test case in valid class of inputs:P (A and C are possible as well)(1 mark)
Example of test case in invalid class of inputs:X (or any character not P,C,or A).(1 mark)

[4]
(c)

Verification is sometimes thought of as answering the following question:Are we building the product right?Validation activities,on the other hand,are thought of as answering the question:Are we building the right product?
Based on your understanding of verification and validation,

(i)Describe in your own words the difference between these two types of activities. Ensure that the difference is clearly presented in your answer.[2 marks ]
For part (i),when one compares verification and validation activities,the former is
more concerned with ensuring that the implementation of software in order to discharge some function is properly carried out.In other words,it is more concerned with process correctness.Validation on the other hand is more concerned with whether the right functions have been implemented,and that this function will properly produce the correct output given some input value.

(ii)In your own opinion,explain why it is that end-users (or customers)of the software being developed would be more concerned with the validation activity rather than the verification activity.[2 marks ]

For part (ii)end-users are typically more concerned that the software can meet their objectives,since the purpose of this software is that it is functional to their requirements.They would be less concerned with how the software works,or how the process of development was carried out to achieve their needs.

As answers for both parts can be quite wide,the following mark allocation should be used in each case:

•0marks if the candidate demonstrates no understanding,or simply copies the statement from the question

•1 mark if the candidate succeeds superficially in differentiating between the activities,with some explanation

•2 marks if the candidate demonstrates good understanding.

[4]