Unformatted text preview: CSE143 Section #3 Problems (handout #1) can pinpoj-nt help you understand part Iesting is an important of writing code. Good testing nard-to-find errors. These errors, when exposed, can then rhat went wrong and what needs to be fixed. named Number with lonsider a class well as the comments for each: C1ass Number Constants DEFAULT-VALUE: Constructors // constructs Number ( ) the following public state and behavior, as i nt, 0 a Number a Number // constructs value) Number(int Methods / / sets the val-ue void setValue (int value) / / gets the value getValue ( ) int / / this boolean method should isPrime ( ) return whether the Number is prime or not a stringt // returns () String toStrirg Without seeing you think will implements this the code that expose some bugs in Number. class, design some tests that Presumably you cases above? Why did you choose the tests so what was your thinking? cases randomlyr on these test did not decide ...
View Full Document
This note was uploaded on 11/03/2009 for the course CSE 143 taught by Professor Sr during the Spring '08 term at University of Washington.
- Spring '08