Computer Programming Java Chapter 3

More stuff

7 cards   |   Total Attempts: 188
  

Cards In This Set

Front Back
Boolean Expression
If(booleanExpression){statements}-if expression is true the statement will be executed-{} are not necessary, statement after will be implied as the statement
Else-if statements
If(booleanExpression){statements}else if(booleanExpression){statements}else if(booleanExpression){statements}-series of expressions that if true, the statement that follows the expression will be executed-max of one statement is executed-if no expression is true, 0 statements are executed-else if statements can be inside other else if statements
Comparison functions
-define if values are continuous (numerical) or discrete (unique characteristic)-use else-if statements as to whether one half of the statement in comparison is actually similar to the other statement
Flowchart representation format
-actions are put in boxes-conditions are put in diamonds
Switch Statements
Switch(expression){
case constantExpressionA:
statements
break;
switch(expression){
case constantExpressionB:
statements
break;
}
-if there is no break, each switch will happen if expression is equal to constantexpression
Else statement
Will execute if the else if statement don't execute
Default Statement
Switch(expression){
.
.
default:
statements
break;
.
}