Software Quality: Quiz 1, 1.3.2000

Index   Quiz 2

  1. Measurement theory.
             Meaningful or not?
    1. The length of Program A is 50 executable statements. (0.5p)
    2. Program A took 3 months to write. (0.5p)
    3. Program A is more readable than Program B. (0.5p)
    4. Program A is more complex than B if it has higher Cyclomatic Complexity.
      (0.5p)

    5. Show that the mean can be used as a measure of central tendency for interval
      scaled data. What about the median? (2p)
    6. What measure can be used as central tendency for nominal data, mean, median,
      mode (= the most often occurring item)? (2p)

  2. Software metrics data collection.
    1. Define the notations of error, fault and failure in software. (3p)
    2. 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)

  3. Analyzing software-measurement data. Given the data on average modul size (MOD),
    and number of faults per KLOC (FD):

    System ABCDEF GHIJKL MNPQR
    MOD 154361104357 586550605096 5161327848
    FD 362215331513 221615181034 1618122021

    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)

  4. 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";
    

  5. 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!