Nested if Statements

if Alternatives

Multiple Alternatives

Beware of the dangling else

Beware of the dangling else

Beware of the dangling else

Testing the State of an
I/O Stream

I/O Stream State Test Example

Problem-Solving Case Study-
Warning Notices

Main Module (Level 0)

Print Message Indicating Status
(Level 1)

Notices Program

More Notices Program

Notices Program (continued)

Notices Program (The End)

Testing and Debugging Phases

Testing and Debugging Phases

Testing Selection
Control Structures

Test Set 1
test1 = 100, test2 =100, test3 = 100

Test Set 2
test1 = 60, test2 = 60, test3 = 63

Test Set 3
test1 = 50, test2 = 50, test3 = 50

Test Set 4
test1 = -50, test2 = 50, test3 = 50