Wyo VB Ch. 4 Lecture Notes

Objective #1: Use If statements to ensure that certain statements are executed only when a given condition applies.

Objective #2: Use If Else and If ElseIf statements to select which of two sequences of statements will be executed, depending on whether a given condition is TRUE or FALSE.

Objective #3: Write VB expressions to form "Boolean conditions," which are expressions whose possible values are the constants TRUE and FALSE.

The string concatenation operator is not an arithmetic operator, but in precedence it does fall after all arithmetic operators and before all comparison operators. Similarly, the Like operator, while equal in precedence to all comparison operators, is actually a pattern-matching operator. The Is operator is an object reference comparison operator. It does not compare objects or their values; it checks only to determine if two object references refer to the same object."

You probably will not have to use the
Like, Is, Xor, Eqv, and Imp operators very often, however the information above may still be useful to you. Those operators will not be covered on tests or quizzes for this course.

Objective #4: Use collision detection to control animation.

Objective #5: Generate random numbers within desired ranges.

Objective #6: Use the Mod operator to test divisibility.

You could say that the rule is "when the Mod of two numbers is zero, then the first number is evenly divisible by the second number." Or, one could say that "when the Mod of two numbers is zero, then the first number is a multiple of the second number."

Objective #7: Use an array to store data.

Objective #8: Use String variables.

You can also use the += operator to concatenate two strings as in

strName = "John"
strLastName = "Doe"
strName += strLastName ' strName is now "JohnDoe" (with no space in between)


This last statement is equivalent to

strName = strName + strLastName

Objective #8: Use the Math class methods.

Objective #9: Use the "macho" rounding formula to implement normal rounding rather than Banker's Rounding like the Math.Round method.

Objective #11: Use While loops.

Objective #12: Trace and apply the sequential search algorithm.

Objective #13: Trace and apply the binary search algorithm.

Objective #14: Be able to use the KeyDown, KeyPress, MouseDown, MouseUp, MouseMove, MouseLeave, & MouseEnter methods.

Objective #15: Use Select Case statements for multiple selection.