Unformatted text preview: utput for NumberTest when a1l flaws (1, 2, 3, and 4) are present DEFAULT_VALUE: O DEFAULT_VALUE: 4 2 Creating a new Number (7) n: 0 n.getvalueO: 0 0 0 0 0 is is is is prime prime prime prime Creating a new Number 0 is prime O is prime a new Number Creating 0 is prime 0 is prime Output for NumberTest when flaw O 42 2 is fixed (flaws t, 3, '1 and 4 still present) DEFAULTVALUE: DEFAULT V ALUE: a new Number (7) Creating n: 7 7 n.getValueO: 1 is prime 0 is prime 1 is prime 4 is NOT prime a new Number Creating 7 is prime 8 is prime a new Number Creating 8 is NOT prime 7 is NOT prime for NumberTest when alL flaws are fixed. Output no longer compile, Note: The code that sets DEFAULT_VALUE will The remaining is: output DEFAULT_VALUE is now a constant. '7 n: n.getValueO: '7 because 1 is NOT prime 0 is NOT prime 1 is NOT prime 4 is NOT prime a new Number2 Creating 7 is prime 8 is NOT prime a new Number2 Creating 8 is NOT prime 7 is prime ...
View
Full Document
 Spring '08
 SR
 new number

Click to edit the document details