ICS 52 - Introduction to Software Engineering
Fall, 1998

Final Exam

  1. (5 points each, 30 points total) Define each of the following terms, as used in software engineering.
    1. Function point system

    2. Internal (to describe a software quality)

    3. Fault (in testing)

    4. Structural testing

    5. Testing oracle

    6. Edge coverage criterion

  2. (4 points) Describe two issues addressed by software configuration management.

  3. (6 points) Below is a USES diagram with fictional module names. For each node, write in the level number, as described in the textbook.

  4. (7 points) Below are two alternate versions of part of a Library module's design. In each case, the getTitlesSortedByAuthor method is supposed to return information about the Titles in the Library, in a specified range of call numbers, and in order by the name of the author.
    	// version 1
    	class Library {
    	   Enumeration getTitlesSortedByAuthor(CallNo start, CallNo end);
    	}
    
    	// version 2
    	class Library {
    	    Title[] getTitlesSortedByAuthor(CallNo start, CallNo end);
    	}
    
    Discuss the relative benefits and shortcomings of each approach (if any), referring to software qualities and principles.

  5. (10 points) According to the Scientific American article ``Command and Control,'' ATAMS was successful because it ``combined several techinques that were shown years ago to produce better software faster.'' Name and briefly describe two techniques mentioned in the article, and explain which software engineering qualities or principles each technique illustrates.
    1. First technique:

    2. Second technique:

  6. (10 points) Dijkstra has written ``Program testing can be used to show the presence of bugs, but never to show their absence.''
    1. Does this statement hold for structural testing? Explain your answer.

    2. If the statement is true, then why do we perform testing?

  7. (15 points) The method sumMaxAndMin is supposed to take three integer parameters and return the sum of the largest and smallest of its parameters. If two of the parameters are equal, one of them is considered to be the middle value that is not summed.

    Assume that the sumMaxAndMin method is invoked elsewhere in the program with this statement: System.out.println(sumMaxAndMin(i, j, k));, where i, j, and k are integers.

    	int sumMaxAndMin(int x1, int x2, int x3)
    	{
    	  boolean med1 = false, med2 = false, med3 = false;
    
    	  if ( (x2 >= x1 && x1 >= x3) || (x2 <= x1 && x1 <= x3) )
    	     med1 = true;
    	  if ( (x1 >= x2 && x2 >= x3) || (x1 <= x2 && x2 <= x3) )
    	     med1 = true;
    	  if ( (x2 >= x3 && x3 >= x1) || (x2 <= x3 && x3 <= x1) )
    	     med3 = true;
    
    	  if (med1)
    	     return x2+x3;
    	  if (med2)
    	     return x1+x3;
    	  if (med3)
    	     return x1+x2;
    	}
    
    1. (4 points) There is an error in sumMaxAndMin. What is it?

    2. (7 points) The method could generate a fault that does not lead to a failure. Explain how, specifying the parameters, the fault, and why no failure occurs.

    3. (4 points) Give an example of input parameters that cause a failure, and say what the failure is.

  8. (3 points) The difference between an ``abstract object'' and a software ``library'' is (choose one)
    1. an abstract object is an ADT.
    2. an abstract object has a state.
    3. a library has an interface.
    4. an abstract object hides implementation details.
    5. a library is reusable.

  9. (3 points) Testing individual modules is called (choose one)
    1. white-box testing.
    2. black-box testing.
    3. testing in the large.
    4. testing in the small.
    5. integration testing.

  10. (3 points) In which quadrant of the spiral model is validation and verification done? (Choose one)
    1. north-east
    2. north-west
    3. south-east
    4. south-west
    5. in all quadrants

  11. (3 points) For a correct program, (choose one)
    1. any test set is ideal.
    2. no test set is ideal.
    3. these is no test selection criteria.
    4. the test set must be a partition.
    5. the complete coverage condition cannot be achieved.

  12. (3 points) The textbook states that in order to achieve modular composability, decomposability, and understanding, modules must have (choose one)
    1. high cohesion and low coupling.
    2. high cohesion and high coupling.
    3. low cohesion and low coupling.
    4. low cohesion and high coupling.
    5. either (a) or (d).

  13. (3 points) Which of the following is a reason why the path coverage condition is almost impossible to achieve? (Choose one.)
    1. The number of nodes in the control flow graph is very large.
    2. The number of execution paths is very large.
    3. Each test case can traverse at most n paths, where n is the number of nodes in the control flow graph.
    4. Some loops in the program would have to be skipped.
    5. Test cases can only test reachable statements.