You are on page 1of 17

GRIFFITH UNIVERSITY

school of computing and information technology

bachelor of information technology

cit2162 software quality principles

FINAL EXAMINATION SEMESTER TWO 1998

question 1 software product quality

(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(b) (continued)

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

c) given the following implementation convert it to the multiple branch structure


form that is needed to draw a branch-successor graph and draw a branch
successor graph for the converted structure.
(3 marks)

/* lflag and qflag have been previously set to true or false */


qcount = 0; lcount =0;
while ((op= readopt(argc, argv, vop)) != eof) {
if (op == opq) {
qflag = true;
if (lflag) {
error = true;
break; }
else { qcount++}
}
else { lflag = true; lcount++}
}
-8-

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 following is a clause extracted from a draft clause of an international standard


- fdis 14598-3: information technology - software product evaluation - part 3:
process for developers.
a) identify the specific requirements in this clause. 3
marks
-9-

b) indicate for each requirement whether conformance to the requirement is


objectively verifiable. 7
marks
- 10 -
question 3 (contd.)

6.2 establish evaluation requirements


this clause relates to the establishment of the general quality requirements and
the analysis of their feasibility.
6.2.1 quality requirements identification
the developer shall ensure that general quality requirements applicable to the
software system are identified. user needs, organizational experience, application
area experience, software integrity requirements, required standards, regulations,
laws etc. should be considered when identifying general requirements.
note 1: software integrity levels are described in iso/iec 15026.

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

a) what attribute is measured in a software process assessment based on, iso/iec


15504?
2 marks

b) a large multinational organisation has conducted iso 15504 based


assessments of the software design process in a number of its software
development laboratories across the world. the results of the assessments
were as follows:

10 laboratories were assessed


3 laboratories were assessed as level 1 capability
5 laboratories were assessed as level 2 capability
1 laboratory was assessed as level 4 capability
1 laboratory was assessed as level 5 capability
which of the following statements about the organisation’s results are
meaningful? which statements are correct? why?
1. the average capability of the software design process in all laboratories in
the organisation is 2.2.

2. the average capability of the software design process in the organisation


is between 2 and 3.

3. 20% of all laboratories have a capability of greater than 3 for their


software design process

4. the 5 laboratories at level 2 have equal process capability in the software


design process

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.)

c) is the measure "number of lines of code" an absolute measure of program


size? justify your answer. if not, is there any entity of which this metric is an
absolute measure?

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)

if 100% coverage is not achieved identify additional paths to achieve coverage,


and define test case values to complete each additional path proposed. references
to additional test cases provided in other subparts can be used.

a) statement coverage (1-1/2 marks)

b) branch coverage (1-1/2 marks)

c) zero-path basis path coverage (1-1/2 marks)

d) one-path basis path coverage (1-1/2 marks)


- 16 -

type order_entry = record


productid : integer;
unitcost : real;
qtyordered : integer;
salestax : boolean;
qtyreceived : integer;
end record;

procedure receive_order (receivedid : integer; qty : integer; cost : real;


orderentries : in out array [1..1000] of order_entry;
count : 0..1000;
accept : in out boolean)
- - searches for a pending order of a particular product of a particular
quantity for - - a particular total cost.
- - if the product is on order of a quantity greater than or equal to the order
- - quantity and the unit cost matches then the quantity of items received is
- - increased, reflecting that the new products are added to stock, otherwise
- - the order is rejected.

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