Here are some questions from old final and midterm exams. Some of these were from take-home exams, and many were from terms in which I used a conventional textbook (usually Sommerville), so they will differ somewhat from an in-class final exam with a "textbook" that was not designed for that purpose.

From Spring 2002, final, take-home w/ Sommerville text

1. Recall this requirement from the Noncemail project:

"Obtaining a nonce address should require a minimum number of steps and a minimum of data entry; the entire process should require less than 15 seconds."

As we discussed in class, the number 15 seconds is essentially arbitrary. We prefer to have an arbitrary number rather than a vague statemement like "the entire process should be fast," because requirements should be
verifiable (cf. Sommerville, page 137, 139). However, the number 15 could be a bad choice. There is a risk that 15 seconds is too long, and the human user would not maintain attention through the steps. On the other hand, it could be too strict, and perhaps require a complex design, while allowing 20 seconds would permit a much simpler implementation strategy. Now put this problem in requirements specification together with what you have learned about software processes and what you have learned about user interface design. How might you address the problem of arbitrary response requirements in a spiral development model? [Length limit: 200 words]

2. In Chapter 12, section 12.2.3 on page 272-273, Sommerville describes four possible approaches to identifying objects in an object-oriented design: (1) grammatical analysis, (2) identifying tangible entities, (3) identifying roles in system behaviors, and (4) scenario-based analysis. Are some of these approaches more compatible than others with information hiding and design for change? Explain. [Length limit 200 words]

3. I have argued that all ultimate source should be kept in a version control system (what Sommerville calls version management), but no derived objects should be under version control. (Essentially the same rule holds for configuration management, which Sommerville discusses in section 29.1.1)

This notion of "ultimate source" versus "derived" is useful when derivation is automatic (e.g., compiling source code), but it does not help us maintain consistency among items that are produced by humans. For example, if a program feature is changed, the tutorial and reference manual may require corresponding changes. Suggest an approach for managing consistency among human-created items.

Note: You will not find a complete answer to this question in the book or in my lectures. I am asking you to do some creative problem-solving using what you know. Although I have an idea of how I would answer this question, I will be happy to see some different good answers that surprise me. A good answer would (a) address the problem rather than wishes it away. For example, do not suggest that all human-produced documents should be entirely independent. (b) be practical, without relying on anything beyond readily available technology. For example, do not suggest a solution that relies on machine analysis of natural language. (c) be practical also in the sense that the human effort required to use the solution and any constraints.

From the Spring 2002 midterm exam (on paper)

1 [20 points] Congratulations, you have been selected as project manager for the Mephistopheles project. Feasibility studies indicate that the project will take approximately 10 months. Those studies also showed that most of the system is similar to systems that our company has developed before, and you will have an experienced team to work with. Only one part has us worried ... no one in the organization has ever built software to control paranormal electro-sympathetic zombie guidance devices (PESZGD) before.

Fortunately this will be a small part of the system and should take no more than a month to construct. Will you schedule construction of the PESZGD software near the beginning of the project, or near the end? Why? Please write one short paragraph (no more than 50 words), justifying your choice as well clearly as you can. 2. [25 points] Exercise 3.2, page 69 of Sommerville, asks you to explain why programs which are developed using evolutionary prototyping are likely to be difficult to maintain. My question is related, but not quite the same: How would you modify an evolutionary prototyping approach to produce systems that are not difficult to maintain. Under what conditions do you think your approach would be successful? Please write one or two short paragraphs (no more than 100 words) and be as specific as possible.

3. [15 points] I once read a program in which many files had code like this.

if (Options.lang == Lang.en) {
      er_msg("The printer is not working");
  } else if (Options.lang == Lang.it) {
      er_msg("La stampa e guasta"); 
  } else if (Options.lang == Lang.de) { 
     ... 
  }

The program printed messages in one of three languages, depending on a command line argument. Adding a fourth language option, or several more, would have required changing many, many source files. How would you reorganize the program?

Please explain your approach in sufficient detail with at least 20 but no more than 100 words.

4. [20 points] Axel and Beth's team uses a version control system to coordinate changes to source code. Beth stores test cases and test drivers for her code in the version control system, in addition to the modules that will be included in the product. Axel stores only the code for the modules in the version control system, and keeps the test cases and drivers in his personal directory. Which approach is better? Why? Write one or two short paragraphs, no more than 50 words total, to explain your answer.

5. [20 points] How do each of the following factors make information hiding more or less critical to a design, or determine how it should be used? Explain with one or two short sentences for each factor.

Excerpts from 1999, Winter and Spring.

(I have omitted several questions on material we did not cover this term.)

  1. Information hiding is often associated with object-oriented design. Can information hiding be applied to the architectural design of systems whose overall organization is not object-oriented, such as systems described by a data flow model? If you say "yes," give a simple example. If you say "no," explain why information hiding cannot be applied to a software system decomposed using a data flow model.
  2. The "basic project hygiene" lecture proposes the rule: "Never edit derived objects." What problem is this rule designed to prevent? Give a concrete example (real or imagined) of the problem.
  3. Sommerville says one of the basic problems of evolutionary development is: "The process is not visible. Managers need regular deliverables measure progress. If systems are developed quickly, it is not cost-effective to produce documents which reflect every version of the system."Describe the concept of process visibility very briefly, and propose a way to achieve some level of process visibility in an evolutionary development project without extensive documentation of intermediate versions of the system.
  4. Smurftronix Inc. is designing a new software-controlled toy to compete with Furby. One of the critical components of the new Smurfy toy is a speech generator, which will generate annoying noises when the toy is approached, lifted, or stomped. Initially the speech generator module will control a hardware device manufactured for smoke alarms, but it is considered likely that cheaper mechanisms may be substituted in the future. Other parts of Smurfy software will access the interface to the speech generator module. Alf has proposed a software interface for the speech generator module, and Betty has proposed another; each claims that their interface design is more "abstract" and is better with regard to information hiding. Is it possible to objectively compare the abstraction and information hiding of the interfaces proposed by Alf and Betty? If so, how might you do so? If not, why not?