Thursday, April 28, 2011

Selection with Switch

Today, we learned Selection with switch also known as the switch-case. The Case statement is used only when the integer is known as a definite constant and not a variable. The first time where break; is crucial in programming is found in case statements. This is a modification of the if statement with cases with several possibilities. The switch-case will be useful for the students working on the Panther Pantry as there are several items that have similar characteristics. I am completed my Selection Sort Class and hope to get rid of the run-time errors.

No comments:

Post a Comment