CS 384 Midterm Examination #3 (Example)

Answer all problems. This is a closed book, closed-note exam.

1. (20 points) Implementation Documentation. What kinds of documentation has your team utilized in order to coordinate and make forward progress on your implementation effort this semester? Has your documentation been ideal? If not, suggest how it should be improved.

2. (30 points) Implementation of UML Constructs. For each element of UML notation, there are corresponding implementation techniques in your project's language (Java, C++, Python, whatever), but some aspects of UML map easily and directly, and others require major effort because the language does not support that concept. List UML notational elements that you can recall, and for each one, sketch out its implementation in your project language.

3. (30 points) Unit Testing. Suppose the unit being tested is a single method within a class -- some public method m with prototype public int m(int, string). How can you determine, and what additional information will you need, in order to determine, how many unit tests are needed for a thorough testing of m's correct functioning? Besides method m()'s code, what will the unit tests have to have in place in order to test m()?

4. (30 points) Integration Testing. What is the difference between integration testing and unit testing? A widely-known form of integration testing is known as the "big bang", where all the classes are just linked together and tested as a whole, immediately after implementation and unit testing are complete. What are the advantages and disadvantages of the "big bang" model? Did you (or do you plan to) use it in your project this semester? If not, suggest an alternative means of integration testing.

5. (30 points) Coverage Testing. Suppose Dr. J proposes a new kind of coverage testing which he calls "association coverage", in which each pointer or object reference in the system is observed, and a count is made of the number of times that pointer/reference is actually followed during a set of tests. How might you implement coverage testing, if you have no tool available to do it automatically for you?

6. (30 points) Metrics. Suppose you are asked to measure the average length, in executable lines of code, and the average time per call, in CPU microseconds, of methods for each class in your project this semester. Are these direct, or indirect measures? How might such measures be used?