ICS52 - Introduction To Software Engineering

Midterm Exam – Summer, 2002

Name: ______Student ID: ______

  1. (20 points, 4 points each) Define the following terms, as used in software engineering:
  1. Program family.

A set of versions of a software product.

  1. High cohesion..

All elements (of a module) are closely related.

  1. Process iteration.

Repetition of parts of the process, often as requirements evolve. Two types are incremental development and spiral development.

  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.

  1. Architectural design

Identification of the sub-systems that make up the system, and their relationships.

  1. (16 points) There are some similarities and differences between a class in Java and the Software Engineering concept of an Abstract Data Type (ADT).

Identify two similarities between Java classes and ADTs.

Both . . .

export a type

have an interface

have an internal state

hide implementation details

are based on information hiding

Identify two ways in which a valid Java class might not be a true ADT.

It might have just functions, no internal data or state, like java.util.Math or Debug from homework 2.

It might be a user interface element, such as a frame.

It might have public data members, which violates the principal of information hiding.

It might use inheritance.

It might be abstract, and therefore incapable of being instantiated.

  1. (12 points) One type of separation of concerns that is important in Software Engineering is modularity: dividing the software into modules, based on functionality, information hiding, and concern for reusability. Describe another type of separation of concerns that is important in Software Engineering. Give an example of how this type of separation of concerns might apply to a software system such as CAPA, and why it might lead to a better software product.

A wide range of answers were accepted for this problem. Scoring was based on four points for describing another type of separation of concerns; four points for giving an example; and four points for writing why this leads to better software. If your sheet is marked with three numbers, this indicates your score for each of the three parts.

  1. (21 points) Identify and briefly discuss three benefits of using the spiral model as opposed to the waterfall model.

1. Focuses early attention on the option of re-using existing software or software components. In the upper left quadrant and upper right quadrant, attention is on considering alternatives, constraints, and risks.

2. Accommmodates preparation for product growth, evolution, changes.

3. Incorporates quality objectives as integral parts of the process and not as side-effects.

4. Focuses on eliminating errors and unattractive alternatives early on.

5. Answers the process ``how much is enough'' question. The spiral starts with a hypothesis that a particular goal (or set of goals) could be improved by a software effort. It terminates when the hypothesis is proved false (cost of continuing judged greater than benefit) or true (installation).

6. Maintenance is not a second-class citizen in the process, but starts a new cycle.

7. The incremental approach is more suited towards families of applications.

8. It encourages a prototyping approach which is well suited for addressing user interfaces. Gets early user feedback based on prototypes.

9. Its prototype-based approach avoids the risk of spending too much time on not-so-important aspects and helps concentrate attention on the relevant issues and risks.

10. Recognizes that specification and implementation are inevitably intertwined.

  1. (16 points) Select one of the principles of software engineering discussed in the lecture (other than “separation of concerns”), and one of the architectural models presented in Chapter 10 or in lecture (other than “abstract machine”). Briefly define each, and then explain how the principle you selected is exhibited in the model you selected.

The answers given here are just examples; obviously there were many ways to answer this question.

Principle and definition: Abstraction – focusing on what is important and ignoring details.

Model and definition: Client - server model – client sub-systems communicate with server sub-systems (and not with each other). Clients make requests to servers, and servers respond with appropriate information.

Explanation:

What is important in the client-server model is the nature of the request and response between clients and servers, and not details such as how they communincate, or where the clients and servers are located.

  1. (3 points) When a module M is decomposed into other modules, we say that these other modules are used to
  1. implement M
  2. interface M
  3. abstract M
  4. design M
  5. export M
  1. (3 points) To achieve a good design, modules should have (choose one.)
  1. low cohesion and low coupling.
  2. low cohesion and high coupling.
  3. high cohesion and low coupling.
  4. high cohesion and high coupling.

E.either A. or D.

  1. (3 points) The textbook lists several required aspects of a software requirements document (due to Heninger, 1980). Which of the following is not on that list?
  1. It should specify the algorithms and data structures to be used. p. 116.
  2. It should be easy to change.
  3. It should record forethought about the life cycle of the system.
  4. It should characterise acceptable responses to undesired events.
  5. It should specify only external system behaviour.
  1. (3 points) Which of the following is not on Boehm’s list of software risk factors?
  1. Over-emphasis on the requirements phase.
  2. Personnel shortfalls.
  3. Gold plating.
  4. Developing the wrong user interface.
  5. Unrealistic schedules and budgets.
  1. (3 points) Which of the following activities would be associated with the upper left hand quadrant of the spiral model? (Choose one.) see p. 54
  1. Prototyping and resolving risks.
  2. Acceptance testing.
  3. Determining objectives.
  4. Developing software requirements.
  5. Software product design.