SWE 637 Homework 5
Fall 2006
Use cases, Graph algorithms: Due 10/17, beginning of class


Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe and not make messes in the house.
- Lazarus Long, "Time Enough for Love"

Answer the following questions. Bring hardcopies of your answers to class, hand written or printouts. All homeworks are due before class on the due date. Please remember that the GMU Honor Code is in effect: You may discuss the assignment with each other, the professor, or the GTA, but each homework should be done individually.

  1. Use Case Modeling. (8 pts)
    Consider the following use case description:
    Use Case Name: Use elevator
    Summary:       Rider calls an elevator and uses it to ride to another floor
    Actor:         Elevator rider
    Precondition:  Elevator is in service
    Description:
     1. Rider presses elevator call button 
     2. Elevator system detects elevator call button pressed 
     3. Elevator moves to the floor 
     4. Elevator doors open 
     5. Rider gets in and presses floor button 
     6. Elevator doors closes 
     7. If requested floor is in the same direction the elevator is going,
        elevator moves to requested floor
     8. If requested floor is not in the same direction the elevator is
        going, and no floors have been requested in that direction, elevator
        changes direction and moves to required floor
     9. If requested floor is not in the same direction the elevator is
        going, and at least one floor has been requested in that direction,
        elevator continues processing requests in the same direction until all
        requests are satisfied, then changes direction and moves to required
        floor
    10. Elevator doors open 
    11. Rider gets out 
    12. Elevator doors closes 
    13. If the elevator has no more requests, it moves to its home floor
    
    1. Draw the activity diagram for this use case.
    2. Identify test paths to satisfy specified path coverage for this graph.
  2. Algebraic Representation of Graphs (12 pts)
    Use the graph below for the following questions.
    Modified Figure 2.10
    1. Find the complete (single-edge) path expression for this graph using the technique in section 2.7. Show all steps.
    2. Use the technique in section 2.7.4 to estimate the number of paths in the graph. Use edge weight 1 for "non-cycle" paths and 5 for cycle edges.
    3. Use the technique in section 2.7.5 to estimate the approximate minimum number of paths to satisfy edge coverage.