Assignment5 - CS 171: Introduction to Programming Using VB...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. PIN Verifier The National Commerce Bank has hired you to create an application that verifies a customer personal identification number (PIN). A valid PIN is a seven-digit number that meets the following specifications: Digit 1: Must be in the range of 7 through 9 Digit 2: Must be in the range of 5 through 7 Digit 3: Must be in the range of 0 through 4 Digit 4: Must be in the range of 0 through 9 Digit 5: Must be in the range of 6 through 9 Digit 6: Must be in the range of 3 through 6 Digit 7: Must be in the range of 4 through 8 The application should allow the user to enter seven digits on a form similar to the one shown below. When the user enters a digit that does not fall into the acceptable range, an error message should be displayed once the verify button is clicked. If all seven digits entered fall into the acceptable range, a message should be displayed telling the user that he has successfully entered a valid pin number. Hint : You can use two arrays: intMin and intMax. The intMin array should hold the minimum values for each digit, and the intMax array should hold the maximum values for each digit. Public Class Form1 Dim intMin() As Integer Dim intMax() As Integer Private Sub Form1_Load( ByVal sender As System. Object , ByVal e As System. EventArgs ) Handles MyBase .Load intMin = New Integer () {7, 5, 0, 0, 6, 3, 4} intMax = New Integer () {9, 7, 4, 9, 9, 6, 8}
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Assignment5 - CS 171: Introduction to Programming Using VB...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online