Tutorial 12 – Security Panel Application Introducing the Select Case Multiple-Selection Statement Outline 12.1 Test-Driving the Security Panel Application.

Slides:



Advertisements
Similar presentations
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 24.1 Test-Driving the Ticket Information Application.
Advertisements

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 12 – Security Panel Application Introducing.
Microsoft Visual Basic: Reloaded Chapter Five More on the Selection Structure.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Introducing Algorithms, Pseudocode and.
VB Chapters 11 & 12 Security panel app chpt 12. Textbox Properties In the Interest Calculator we have a few new properties Multi-line property set to.
CSC110 Fall Chapter 5: Decision Visual Basic.NET.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 9 Car Payment Calculator Application Introducing the Do While...Loop and Do Until...Loop.
XP Tutorial 14 New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with Forms and Regular Expressions Validating a Web Form with JavaScript.
© 1999, by Que Education and Training, Chapter 5, pages of Introduction to Computer Programming with Visual Basic 6: A Problem-Solving Approach.
Tutorial 14 Working with Forms and Regular Expressions.
Microsoft Visual Basic 2005 CHAPTER 5 Mobile Applications Using Decision Structures.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Interest Calculator Application Introducing the For...Next Repetition Statements.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Five More on the Selection Structure.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Typing Application Introducing Keyboard Events, Menus, Dialogs and the Dictionary.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 7.1 Test-Driving the Wage Calculator Application.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Wage Calculator Application: Introducing.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 9 – Income Tax Calculator Application: Introducing.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 17 – Flag Quiz Application Introducing One-Dimensional.
Decisions and Debugging Part06dbg --- if/else, switch, validating data, and enhanced MessageBoxes.
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Security Panel Application Introducing the Select Case Multiple-Selection Statement.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Class Average Application Introducing the Do...Loop While and Do...Loop Until.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 20.1 Test-Driving the Shipping Hub Application.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.1.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 18 – Student Grades Application Introducing.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Inventory Application.
Chapter 3 Control Structures. The If…Then Statement The If…Then statement is a Decision statement = that executes a set of statements when a condition.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 15 – Fund Raiser Application Introducing.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.1.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Craps Game Application Introducing Random-Number Generation and Enum.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
XP Tutorial 7 New Perspectives on JavaScript, Comprehensive 1 Working with Forms and Regular Expressions Validating a Web Form with JavaScript.
Microsoft Visual Basic 2012 CHAPTER FIVE Decision Structures.
Murach’s Visual Basic 2008, C7, modified or added© 2008, Mike Murach & Associates, Inc. Slide 1.
 2003 Prentice Hall, Inc. All rights reserved. 1 Outline 11.1 Test-Driving the Interest Calculator Application 11.2 Essentials of Counter-Controlled Repetition.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Enhanced Car Payment Calculator Application Introducing Exception Handling.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
Visual Basic Fundamental Concepts
14 Shipping Time App Using Dates and Timers
Tutorial 14 – Shipping Time Application Using DateTimes and Timers
Tutorial 10 – Class Average Application Introducing the Do…Loop While and Do…Loop Until Repetition Statements Outline Test-Driving the Class Average.
Tutorial 9 - Car Payment Calculator Application Introducing the while Repetition Statement Outline 9.1 Test-Driving the Car Payment Calculator Application.
Project 9 Creating Pop-up Windows, Adding Scrolling Messages, and Validating Forms.
Multiple Classes and Inheritance
13 Enhancing the Wage Calculator App
CHAPTER FIVE Decision Structures.
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Microsoft Access Illustrated
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
CHAPTER FIVE Decision Structures.
Variables and Arithmetic Operations
Visual Basic..
Custom dialog boxes Unit objectives
Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline Test-Driving the Microwave Oven Application Designing.
Department Array in Visual Basic
WEB PROGRAMMING JavaScript.
Integrating JavaScript and HTML
Chapter 3: Introduction to Problem Solving and Control Statements
Chapter (3) - Looping Questions.
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Additional Topics in VB.NET
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Presentation transcript:

Tutorial 12 – Security Panel Application Introducing the Select Case Multiple-Selection Statement Outline 12.1 Test-Driving the Security Panel Application 12.2 Introducing the Select Case Multiple-Selection Statement 12.3 Constructing the Security Panel Application 12.4 Wrap-Up

In this tutorial, you will learn to: Objectives In this tutorial, you will learn to: Use the Select Case multiple-selection statement. Use Case statements. Use the Is keyword. Display a date and time. Use TextBox property PasswordChar.

12.1 Test-Driving the Security Panel Application

12.1 Test-Driving the Security Panel Application Load the Wage Calculator application Debug > Start

12.1 Test-Driving the Security Panel Application Figure 12.1 Security Panel application executing. TextBox Keypad Output ListBox

12.1 Test-Driving the Security Panel Application Figure 12.2 Asterisks displayed in Security code: field. An asterisk is displayed for each numeric key pressed

12.1 Test-Driving the Security Panel Application Entering invalid code Enter 1212 Click # Button

12.1 Test-Driving the Security Panel Application Figure 12.3 Security Panel displaying Access Denied message. Message indicating that an invalid security code was entered

12.1 Test-Driving the Security Panel Application Entering valid code Enter 1006 Click # Button

12.1 Test-Driving the Security Panel Application Figure 12.4 Security Panel application confirming a valid security-code entry. Message displayed when a valid security code is entered

12.2 Introducing the Select Case Multiple-Selection Statement Select Case statement Begins with keywords Select Case followed by test expression Can contain optional Case Else statement Terminates with keywords End Select

12.2 Introducing the Select Case Multiple-Selection Statement Figure 12.5 Select Case multiple-selection statement UML activity diagram.

12.3 Constructing the Security Panel Application

12.3 Constructing the Security Panel Application

12.3 Constructing the Security Panel Application Figure 12.7 Variable declarations for btnEnter_Click. Declaring event handler’s variables Declaring variables Clearing the TextBox

12.3 Constructing the Security Panel Application Creating Case statement Specify a range of values using: Keyword Is Comparison operator (in this case, <)

12.3 Constructing the Security Panel Application Figure 12.8 Select Case statement. Creating a Select Case statement Create Select Case statement Set controlling expression

12.3 Constructing the Security Panel Application Figure 12.9 First Case added to Select Case statement. Is keyword can be used for relational and equality comparisons

12.3 Constructing the Security Panel Application Creating a Case statement Specifying a range of values using: Keyword To Checking for a specific number Specifying multiple expressions Use a comma to separate expressions

12.3 Constructing the Security Panel Application Figure 12.10 Cases specified for remaining access codes. To keyword can be used to specify a range of values to test. Comma used to separate multiple expressions in a Case

12.3 Constructing the Security Panel Application Creating a Case Else statement Use keywords Case Else Must follow all other Case statements

12.3 Constructing the Security Panel Application Figure 12.11 Case Else of the Select Case statement. Case Else statement executes when no other case matches

12.3 Constructing the Security Panel Application Date structure Stores and displays date and time information Property Now returns: System time as a Date

12.3 Constructing the Security Panel Application Figure 12.12 Updating the Security Panel application’s ListBox.

12.3 Constructing the Security Panel Application Figure 12.13 Event handler btnZero_Click. Appending “0” to the end of a String

12.3 Constructing the Security Panel Application Figure 12.14 Event handlers btnOne_Click and btnTwo_Click. Appending “1” and “2” to the end of a String

12.3 Constructing the Security Panel Application Figure 12.15 Event handler btnClear_Click defined. Clearing the TextBox

Using a Select Case statement to determine user access level SecurityPanel.vb (1 of 5) Declaring variables Retrieving access code and clearing TextBox Using a Select Case statement to determine user access level

SecurityPanel.vb (2 of 5) Appending the numeric Button value to the text stored in the TextBox

SecurityPanel.vb (3 of 5)

SecurityPanel.vb (4 of 5)

SecurityPanel.vb (5 of 5) Clearing the TextBox