Professional Documents
Culture Documents
question 1 (a)
suppose someone has sought your advice on how to go about the construction
a software product quality model to be used in conjunction with the ada
programming language. outline what specific instructions, advice and
examples you would give the person so that they may be able to go away and
successfully build an effective product quality model? the model is intended to
be used both to “build quality into software” and for inspection purposes.
(4 marks)
-2-
question 1 (b)
given that a client has specifically asked that the software system that is to be
built for them is highly reliable explain what you would do to ensure that this
product quality requirement is satisfied?
(2 marks)
question 2 (a)
given the following implementation below draw a branch-successor graph for it.
(2
marks)
{pre: x < y < z & y > 0}
c:= 0;
do x < z ->
if x < y -> x:= x + 1; c :=c + 1
[] x >= y -> x:= x + y
fi
od
-4-
-5-
question 2 (b)
20 /* read a word */
21 while(chr != space) && (chr != eol) && (chr != eof) {
22 getchar(chr);
23 }
24 /* read spaces */
25 while (chr = = space) && (chr != eol) {
26 getchar(chr);
27 }
28 line++;
29 }
30 }
31 if (chr = = eof) {
32 /* print line count and */
33 ...
34 }
35} /* end main */
-6-
-7-
question 2 (b) (continued)
-8-
question 2 (c)
newdata = true;
if (tst == avail) {
if (oldata) {
error = true;
break; }
else { newcount++;}
}
else if (tst == notready) { oldata = true; oldcount++;}
else { error = true; break;}
i = i + 1;
}
-9-
question 2 (d)
restructure the code fragment in (c) to remove any logical redundancy and/or
redundant testing, any unnecessary assignments and any fragments that can
be placed outside the loop.
(2
marks)
- 10 -
question 3 (process)
(a) give a definition of “standard” and indicate how this definition is relevant
to software engineering concerns.
(4 marks)
- 11 -
question 3 (continued)
the purpose of this activity is to ensure that all resource, personnel, and
commitment prerequisites for the measurement process have been satisfied.
as a result of the successful implementation of this activity:
1. establish commitment
2. assign competent resources
(c) the plan - do - check - act cycle is the basis of many approaches to
process improvement. if improvement is based on software process
assessment, where in the pdca cycle does the assessment function fit?
what would be the next actions to follow in the cycle?
(4 marks)
- 18 -
question 5 software testing (marks 10)
begin
-- check year
if year >= 0 then
yearok := true
end if;
-- check month
if month >= 1 and month <= 12 then
monthok := true
end if;
-- check day
if day >= 1 and day <= 28 then
dayok := true
else if day = 29 and month = 2 and
(year mod 400 = 0 or (year mod 4 = 0 and not (year mod 100 =
0))) then
dayok := true
else if day = 30 and not month = 2 then
dayok := true
else if day = 31 and not month = 2 and not month = 4 and not month
=6
and not month = 9 and not month = 11 then
dayok := true
end if;
- - consolidate result
if dayok and monthok and yearok then
result := true
else
result := false
end if
end check_date;
- 19 -
question 5 (continued)
T F
? - Day = 29 and Month = 2 and
G (Year mod 400 = 0 or
(Year mod 4 = 0 and not (Year mod 100 = 0)))
F T F
H T F
? - Day = 31 and not Month = 2 and
K
not Month = 4 and not Month = 6
J T and not Month = 9 and not Month = 11
F
1. complete the table below to indicate what paths are covered by the test cases.
(2 marks)
2. add additional test cases that are required to achieve 100% statement
coverage. (2 marks)
3. add additional test cases that are required to achieve 100% branch coverage.
(2 marks)
references to above test cases may be used.
4. for the following condition define the conditions required to achieve 100%
modified condition/decision coverage. (2 marks)
5. for the following condition define the conditions required to achieve 100%
modified condition/decision coverage. (2marks)
references to above test cases may be used.