Control Your Application Sequence, Selection, and Repetition
Controlling your Application Sequence –Functions and Procedures Selection –If...Then...Else statement –Select Case statement Repetition –For...Next Loop statement –For Each...Next statement –Do Loops
The If Statement Example: If UserAnswer = CorrectAnswer Then imgSimle.Visible = True Else imgFrown.Visible = True End If
The Select Case Statement Select Case Weapon Case “Rock” txtMessage = “Rock crushed scissors.” Case “Scissors” txtMessage = “Scissors cut paper.” Case “Paper” txtMessage = “Paper covers rock.” End Select
Learning to Add Project Specification for the Game –purpose of the game is to practice addition skills –use numbers between 0 and 9 –user is a pre-school age child, in kindergarten, or in first grade –user may not yet know how to read –game should give visual feedback indicating correct or incorrect answer
Learning to Add Game Reward for correct answer
Learning to Add Game Image for incorrect answer
Design the User Interface Prototype - a partially completed version of an application that demonstrates the “ look and feel ” of the finished product Usability Testing - end user or client tests design of user interface using a prototype
Making Decisions with the Learning to Add Game Hands-On Exercise 2 (p ) –Create the Learning to Add Project –Add Controls to Display the Problem –Set Common Properties –Set Individual Control Properties –Add More Images and Set Properties –Add Picture Box Controls for Icon Buttons
Making Decisions with the Learning to Add Game Hands-On Exercise 2 (continued) –Add Banner Comments –Add the Load Form Procedure –Add the Checkmark Picture Procedure –Add the Arrow Picture Procedure –Run and Save your Project –Test and Debug your Project –Print your Project Code and Exit
End of Lecture