
Ross Sheppard High School
Computer Programming 20
Student Learning Guide
Controlling Program Flow with Decision Structures
The Decisions Program
| When you have finished this project, you will be able to: | |
| create a series of decision structures | |
| describe how each decision structure works | |
| explain the logic of decision structures |
| Object | Property | Setting |
| Form | Name | frmDecisions |
| Caption | The Decisions Program | |
| TextBox | Name | txtGuess |
| Text | No text | |
| Label | Name | lblGuessMessage |
| Caption | Blank | |
| Label | Name | lblInstruction |
| AutoSize | True | |
| Caption | Guess a number between 1 and 10 | |
| Label | Name | lblMyGuess |
| Caption | My Guess | |
| Command Button | Name | btnCheckGuess |
| Caption | Check Guess | |
| Command Button | Name | btnExit |
| Caption | Exit |


|
Operator |
Meaning |
|
= |
equals |
|
< |
less than |
|
<= |
less than or equal to |
|
> |
greater than |
|
>= |
greater than or equal to |
|
<> |
not equal to |
| Object | Property | Setting |
| TextBox | Name | txtGrade |
| Text | No text | |
| Label | Name | lblEnterGrade |
| AutoSize | True | |
| Caption | Enter a mark | |
| Label | Name | lblResult |
| AutoSize | False | |
| Caption | Blank | |
| CommandButton | Name | btnCheckGrade |
| Caption | Check Grade |



| Object | Property | Setting |
| TextBox | Name | txtGuess2 |
| Text | No text | |
| Label | Name | lblGuessMessage2 |
| Caption | Blank | |
| Label | Name | lblInstruction2 |
| AutoSize | True | |
| Caption | Guess a number between 1 and 10 | |
| Label | Name | lblMyGuess2 |
| Caption | My Guess 2 | |
| Command Button | Name | btnCheckGuess2 |
| Caption | Check Guess 2 |


| Object | Property | Setting |
| Form | Name | frmPassword |
| Caption | The Password Program | |
| TextBox | Name | txtPassword |
| Text | No text | |
| PasswordChar | * | |
| Label | Name | lblMessage |
| Caption | Type a password to log on to the computer | |
| Label | Name | lblPassword |
| Caption | Password: | |
| Command Button | Name | btnOK |
| Caption | OK | |
| Command Button | Name | btnCancel |
| Caption | Cancel |


