Software Quality: Quiz 1, 1.3.2000
Index
Quiz 2
- Measurement theory.
Meaningful or not?
- The length of Program A is 50 executable statements. (0.5p)
- Program A took 3 months to write. (0.5p)
- Program A is more readable than Program B. (0.5p)
- Program A is more complex than B if it has higher Cyclomatic Complexity.
(0.5p)
- Show that the mean can be used as a measure of central tendency for interval
scaled data. What about the median? (2p)
- What measure can be used as central tendency for nominal data,
mean, median,
mode (= the most often occurring item)? (2p)
- Software metrics data collection.
- Define the notations of error, fault and failure in software. (3p)
- Whenever a problem is observed, we want ot record its key elements so we
can investigate the causes and cures. Which are these key elements? (3p)
- Analyzing software-measurement data.
Given the data on average modul size (MOD),
and number of faults per KLOC (FD):
System |
A | B | C | D | E | F |
G | H | I | J | K | L |
M | N | P | Q | R |
MOD |
15 | 43 | 61 | 10 | 43 | 57 |
58 | 65 | 50 | 60 | 50 | 96 |
51 | 61 | 32 | 78 | 48 |
FD |
36 | 22 | 15 | 33 | 15 | 13 |
22 | 16 | 15 | 18 | 10 | 34 |
16 | 18 | 12 | 20 | 21 |
a. Determine the boxplot for MOD. (2p)
b. Add a system (S,97,38) in a., and recompute the boxplot. (1p)
c. Draw the scatter plot for the pairs FD, MOD above. (2p)
d. What observations can you make based on the plot? (1p)
- Determine the length of the program below in LOC for three different definitions
of LOC. End of statement is ; in Perl.
#!/usr/bin/perl -w
# This program reads student grades from the file grades and
# prints them in an easily readable form.
open(GRADES, "grades") or die "Can't open grades: $!\n";
while ($line = < GRADES >) {
chop $line;
($student, $grade) = split(/ /, $line);
$grades{$student} .= $grade . " ";
}
close(GRADES);
print "\nScores and averages for students in alphabetical order
by program 'gradation.pl' using input file 'grades'\n\n";
foreach $student (sort keys %grades) {
$scores = 0; $total = 0;
@grades = split(/ /, $grades{$student});
foreach $grade (@grades) {
$total += $grade; $scores++;
}
$average = $total / $scores;
print "$student: $grades{$student}\t\tAverage: $average\n";
}
print "\n";
- The following set of nodes (start node in bold) form a flowgraph.
(0,1),(1,2),(2,3),(3,4),(3,5),(4,2),(5,6),(6,5),(6,2),
(2,7)(7,8),(7,9),(8,9).
Draw the flowgraph and its
decomposition tree. Check the result by writing the
corresponding sceleton program using if, while, repeat statements. Use begin
end where necessary.
Write structuredly, clearly, legibly, and briefly!
|