Professional Documents
Culture Documents
(a) what do you see as the key things that contribute to producing quality
software?
(3 marks)
-2-
question 1 (b)
(b) suppose you have been given project responsibility for ensuring that a high
quality product is produced for a large new customer. it is known that if the
customer is happy with the quality of the product there is likely to be a
number of other projects that follow. what would you do?
(5 marks)
-3-
question 1 (continued)
c) given that a client has specifically asked that the software system that is to
be built for them is very easy to use, explain what you would do to satisfy this
product quality requirement?
(2 marks)
-4-
-5-
question 2
(a) how does a branch-successor graph help in deciding how a loop may be re-
engineered?
(2 marks)
(b) given the following implementation below draw a branch-successor graph for
it.
(3 marks)
{pre: a < b < d & a > 0}
c := 0;
do a < d ->
if a < b -> a:= a + 1; c :=c + 1
[] a = b -> t := c; a:= a := a + 1
[] a > b -> a:= a + b
fi
od
-6-
-7-
question 2
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)
question 3
the developer shall ensure that an agreed quality model is used for structuring the
quality requirements.
note 2 : a quality model is described in iso/iec 9126-1.
a list of other system requirements that may affect the feasibility of the quality
requirements shall be produced. acquisition concerns, such as cost and schedule
constraints, warranties, and organizational concerns should be considered.
mutually exclusive requirements should be resolved.
note 3: at this stage in the work process focus should be on external product attributes.
all parties involved in the creation and use of the software system should
participate or be represented in the quality requirements identification process.
the relative priorities of the requirements should be discussed with all involved
parties. each group should weigh the quality requirements against the other
system requirements and constraints. all viewpoints should be considered.
the identified quality requirements may be conflicting or cooperative. conflicts
between the requirements shall be resolved at this point. in addition, if the choice
of quality requirements is in conflict with cost, schedule or system functionality,
one or the other shall be altered.
the developer shall execute a feasibility analysis of the quality requirements.
experience from previous projects with similar quality requirements carried out in
the developers organization should be considered.
the developer shall ensure that the requirements are technically feasible,
reasonable, complementary, achievable and verifiable.
the quality requirements shall be resolved into a single set of quality requirements
formulated according to the agreed quality model. agreement to the final list of
general requirements should be sought from all involved parties.
- 11 -
question 4
5. the level 4 laboratory will always produce better software designs than
the level 1 laboratories.
5 marks
- 12 -
question 4b (contd)
- 13 -
question 4 (contd.)
3 marks
- 14 -
questiion 5 10 marks
answer the following questions for the routine and test cases attached:
1. draw a flow graph for the routine and uniquely label the nodes of the graph (2
marks)
2. indicate, for test cases tc1, tc2 and tc3 below, what paths are followed through the
flow graph. (2 marks)
- 15 -
3. for the following coverage types, identify whether 100% coverage is achieved
using test cases tc1, tc2 and tc3. (6 marks)
ind : 1..1000 := 1;
begin
found := false
while ind <= count and not found loop
if orderentries(ind) = receivedid then
found := true;
subtotal := orderentries(mid).unitcost * qty
if orderentries(mid).salestax then
subtotal := subtotal + (subtotal * 0.22)
end if;
if subtotal = cost and
(qty + orderentries(mid).qtyreceived) <=
orderentries(mid).qtyordered) then
accept := true;
orderentries(mid).qtyreceived := orderentries(mid).qtyreceived
+ qty;
else
accept := false;
end if;
else
ind := ind + 1;
end if;
end loop;
if ind <= count then
- - not found
accept := false;
end;
end receive_order;
- 17 -
test cases
tc1
inputs
receivedid = 1
qty = 2
cost = $488
orderentries =
productid unitcost qtyordered salestax qtyreceived
1 1 $200 2 y 0
count = 1
outputs
accept = true
orderentries =
productid unitcost qtyordered salestax qtyreceived
1 1 $200 2 y 2
tc2
inputs
receivedid = 1
qty = 2
cost = $400
orderentries =
productid unitcost qtyordered salestax qtyreceived
1 1 $200 2 y 0
count = 1
outputs
accept = false
orderentries =
productid unitcost qtyordered salestax qtyreceived
1 1 $200 2 y 0
tc3
inputs
receivedid = 2
qty = 2
cost = $488
orderentries =
productid unitcost qtyordered salestax qtyreceived
1 1 $200 2 y 0
count = 1
outputs
accept = false
orderentries =
productid unitcost qtyordered salestax qtyreceived
1 1 $200 2 y 0