Section3Key 3 - utput for NumberTest when a1l flaws (1, 2,...

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: 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) DEFAULT-VALUE: 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

Ask a homework question - tutors are online