Due before the beginning of class Tuesday, March 13. Thursday, March 15
Yes, only a week after HW3, but there is relatively little new material. The HW3
teams will stay together for HW4.
Re-do HW3 with JUnit testing of the correctness of the result. In the "actual" and "expected" notation used in describing JUnit tests, the "actual" is the square or your answer, and the "expected" is just 2. Naturally, we can't expect an exact match for an iterative process that leads to an approximation to an infinitely repeating decimal, so you will have to specify a tolerance, which should be about 10-d, where d is the number of decimal places in your answer. That may be just a little too "tight"; we'll look into that as people start to get results.
More details as we go along, obviously.
ADDED 3.8.2007: Here is a list of all the methods in the Assert class: http://www.junit.org/news/junit/javadoc/3.8.1/index.html At least scan through this, to see what the pattern of parameters is: all the primitive types, plus Strings; where it makes sense there is a version with a delta and one without.
The due date is still Tuesday, March 13. so you absolutely have to start on the HW before class on Thurs March 8, so you can have questions. And the first midterm--which will include questions on both parts of HW4, is still scheduled for Thurs March 15. (You can do this. The midterm questions on JUnit testing will be simple.)
Check out the Darwin quote on the homepage. (Is what I am doing to you here a fair example of what Darwin meant by "change"?)
Back to the top of the Spring 2007 CSc 221 page
Back to Dan McCracken's Home Page