ICS 52 - Introduction to Software Engineering
Spring, 1999

Midterm Exam

  1. (6 points each, 36 points total) Define each of the following terms, as used in software engineering.
    1. Module

      Hides a secret; communicates through well-defined interfaces; a software fragment; a provider of computational resources or services; a collection of routines, data, objects.

    2. Adaptive Maintenance

      Adjusting the software to changes in the environment.

    3. Acceptance Test Plan

      A plan for evaluating an implemented software system to determine whether it meets all the requirements and constraints specified in a Requirements Specification Document.

    4. External (describing a software quality)

      Visible to the users of the system.

    5. The USES relationship

      Module a USES module b if and only if a only works correctly when b works correctly.

    6. Module Interface ( not Java's interface construct)

      The set of functions or services that a module exports or provides to its clients. A contract between the module and its clients.

  2. (10 points) Consider this statement: ``Reliability is a byproduct of a disciplined approach to design.'' (on p. 145)

    Do you agree or disagree with this statement? State the case for or against your position. Your argument should include a definition of ``reliability'' as it pertains to software engineering, and a definition of or example of ``disciplined'' design.

    Definition of reliable (2 points): dependable; operates as expected over time.

    Definition of disciplined (2 points): rigorous; follows a set of rules.

    Argument (6 points): Pro, considers qualities, tries to avoid errors, is thorough and complete, is careful and reviews work. Con: reliability is not unintentional or incidental, no guarantee of reliability from discipline alone, depends on implementation not design.

  3. (10 points) Name and define two software process models other than the waterfall model and the spiral model.

    Code and fix model. The cycle ``write code, repeat code'' is repeated indefinitely.

    Do-it-twice mode. The first version is a throwaway prototype, and the second version is developed, often using the waterfall model.

    Evolutionary model. The functionality is divided into increments, and each increment is developed and delivered to the user; after each delivery, objectives are adjusted if necessary.

    Transformation model. Formal requirements are transformed into executable code.

  4. (10 points) ``Information systems'' such as SubHub manage the storage and retrieval of data by maintaining a database to which transactions are applied to create, retrieve, updated, or delete items. Information systems are data oriented and can be characterized on the basis of the way they treat data. (p. 36) Although generic and general software qualities such as correctness, maintainability, reliability, and user friendliness certainly pertain to information systems, these systems can also be evaluated by considering more specific qualities, which might not apply to all software systems.

    Identify and define two software qualities which are particularly suitable to information systems and which do not apply to all software systems.

    See pp. 36-37.

    Data integrity. The data is immune to being corrupted when the system malfunctions.

    Security. The system protects the data from unauthorized access.

    Data availability. The proportion of time and places at which the data is available when it should be.

    Transaction performance. The number of transactions carried out per unit of time.

  5. (16 points) Give an operational specification for the justify function in a word processor:

    The justification function relies on three pieces of information: the maximum width of a line, the set of white space characters that separate words, and the choice of left justification, right justification, or full (both left and right) justification. The justify function can work as words are entered, or it can be applied to previously existing text. In either case, it considers each word in order, and puts it on the current line, if there is room. If there is not room, then the word is placed on the next line, and the current line is justified as follows. Left justification: no white space is put to the left of the leftmost word, and enough white space is placed to the right of the rightmost word to reach the maximum line width. Right justification: no white space is put to the right of the rightmost word, and enough white space is placed to the left of the leftmost word to reach the maximum line width. Full justification: no white space at either end of the line, and interword spacing is increased by one printer's point per interword space until the maximum width is reached but not exceeded; additional points of white space required to reach the exact maximum width are randomly added to interword spaces.

    Give a descriptive specification for the justify function.

    After justification is applied to part or all of the text, all lines in that part will have a width no greater than a maximum determined by the user. If left justification is applied, the leftmost parts of the leftmost word in each line will be aligned horizontally. If right justification is applied, the rightmost parts of the rightmost word in each line will be aligned horizontally. In full justification is applied, then each edge of a line is aligned with the corresponding edge of the line above it; this is achieved by increasing the interword spacing in as uniformly as possible.

  6. (3 points) Why would a class in Java contain a field designated as private (choose one)?
    1. To promote information hiding.
    2. So that it can be accessed by inherited classes.
    3. So that it retains its value for the life of the program.
    4. To make the program more efficient.
    5. To ensure high cohesion.

  7. (3 points) Which of the following was presented as the major objection to design by stepwise refinement?
    1. It does not focus on maintainability and reliability.
    2. It is not an iterative process.
    3. It uses a divide and conquer approach.
    4. It results in larger amounts of source code.
    5. It forces consideration of too many design options.

  8. (3 points) Which of the following is not true of integration testing?
    1. It should be performed after acceptance testing.
    2. It determines whether modules make compatible assumptions about each other.
    3. It can be done in a top-down or bottom-up fashion.
    4. It can take advantage of the USES diagram.
    5. It can be started before all modules are fully coded.

  9. (3 points) In Object Oriented design, there is a single type of module, which is (choose one)
    1. the ADT module.
    2. the interface.
    3. the sub-type module.
    4. the extends module.
    5. the USES module.

  10. (3 points) Which of the following is not one of Boehm's Top 10 software risk items?
    1. Failure of information hiding.
    2. Personnel shortfalls.
    3. Shortfalls in externally furnished components.
    4. Developing the wrong user interface.
    5. Gold plating.

  11. (3 points) Which of the following activities could be associated with the upper right hand quadrant of the spiral model? (Choose one)
    1. Prototyping and resolving risks.
    2. Acceptance testing.
    3. Determing objectives.
    4. Developing software requirements.
    5. Software product design.