Section3Problems 2 - CSE143 Section #3 Problems (handout...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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

Ask a homework question - tutors are online