Page 16 - PowerPoint Presentation
P. 16

Branching











            o Sequential control structure: computer executes each statements one after another



            o Conditional control structure: allow computer to choose between (two) alternative



                  executions



            o Use a condition/boolean expression: a statement (logical expression) that is either true or



                  false



            o Java uses if, if-else, multiway-if-else and/or switch statements with an assertion to alter


                  the flow of the program and create conditional control structure
   11   12   13   14   15   16   17   18   19   20   21