3rd edition:
Chapter 2 (Principles of Programming and Software Engineering):
- Self-test Exercise 2 (page 127)
- Write specifications for a method that computes the sum of the first five positive integers in an array of N arbitrary integers.
- Write the method that these specifications describe and state the loop invariants.
- Exercises 11, 13, 14a (pages 130 - 131),
For the programming problem (write the method...), test it using JUnit; your tests should include both normal (expected) and alternate (unexpected) inputs; hand in the source code of your class to be tested + the JUnit test class, as well as a screen snapshot showing that your JUnit tests passed. Follow the documentation and style guidelines as discussed in class and in chapter 1.
Grading
Self-test exercises
|
10 points
|
Exercise 11
|
10 points
|
Exercise 13
|
10 points
|
Exercise 14a
|
5 points
|
loop invariant for the method you implement
|
5 points
|
correctness of implementation
|
15 points
|
correctness of tests + screen snapshot showing all tests passed
|
15 points
|
choice of tests
|
15 points
|
documentation/style for class to be tested + JUnit test class
|
15 points
|
The assignment should be done individually.
[Back to the Assignments Index]