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

Notes for Slide 10
It is often easy to be confused as to how to
best assign values to boolean variables
and when to use boolean variables.
This slide shows three example programs
where the first program does not use a boolean variable.
Notice that the specification for a passing score
is shown inside an if-statement.
The second program shows how one might typically
assign a value to a boolean variable.
This is not a desirable style of programming,
as the third example shows the appropriate style
for assigning a value to a boolean variable.


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