Contact PSVM   (Q & A)  |  Notes Below   Audio  |  [toc]   [prev] Slide 8 of 10 [next]
SIJLesson12 Slide08
1, 2, 3, 4, 5, 6, 7, [8 (top)], 9, 10, [Lab]

Notes for Slide 08
The answers to these questions will require some thinking.
If you are unsure what is being asked in the first question,
refer to the previous slide and in the bottom program switch
the condition in the elseif-statement with the condition in
the if-statement. So, the program would now read

if (!(guess > 1812)) {
System.out.print("Guess what?");
} else if (guess == 1812) {
System.out.print("Guess what?");
} else {
System.out.print("Guess what?");
} //endif

Does the above program result in the same output as the
program shown on the previous slide?
As for the second of the two questions asked on this slide,
the hint is actually just an example to make sure that you
understand the question. It might help to read the second
condition out loud. One would typically read
!(guess > 1812)
as, "not guess greater than 1812",
or, "guess is not greater than 1812".


1, 2, 3, 4, 5, 6, 7, [8 (top)], 9, 10, [Lab]