Part Two: Selection Structure Paper
A selection structure is placed within a program to allow the program to take different paths of execution which can result in different end results. In programming, selection structure is composed of three basic types: Single-alternative (If…Then), Dual-alternative (If…Then…Else), and Case (Switch) structures. In this paper we will look at the Single-alternative structure applied to a part of the proposal presented in the previous week.
Selection control structures are utilized to make a decision or comparison which then selects on of two paths depending on the decision made. In these structures the condition must end up resulting in either a true or false statement which guides the decision making of the program. The pseudocode of a selection control structure is as follows:
If the condition is true: take this direction.
Else, take this direction.
Preform these tasks depending on the condition resulting in a true of false statement.
The relational operators that are found within these structures are less than, greater than, less than or equal to, greater than or equal to, not equal to, or equal to. These operators help determine the question either true or false.
Applied to the proposal
In the previous week, I outlined a proposal for an organizational program for my son’s football league covering many different aspects from schedules to individual player equipment. The Visual Logic file accompanied with this document highlights one of the areas that would use a selection structure. The Visual Logic file covers the player’s equipment for a season, based upon grade year.
Selection control structures allow a program to make critical decisions within a program based upon user interaction. While there are three different types of selection control structures available, the true-false aspect is the...