Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Open the Validate Number Solution.sln file contained in the VB2017Chap07Validate Number Solution folder. The interface provides a text box for entering a 9-digit number. The

Open the Validate Number Solution.sln file contained in the VB2017\Chap07\Validate Number Solution folder. The interface provides a text box for entering a 9-digit number. The btnValidate_Click procedure should use the algorithm and example shown in Figure 7-56 to validate the users entry. The procedure should display a message indicating whether the entry is or is not valid. Code the procedure. Include any other code that will professionalize the interface. Save the solution and then start and test the application. Create an independent function to validate the number, pass the number as a string to the function, and have the function return a boolean (true if valid, false if invalid). Before invoking the function to validate the number, insure that the input text box contains the correct number of characters and that all the characters are numbers, and if not, display a message box informing the user to enter the correct number of characters. If the number is valid, display "Valid!" in the output label. If the number is not valid, display in red text "Not Valid!". Keep the TextAlign property of the output label MiddleCenter.

image text in transcribed

must include a substring

must include keypress

must include mod

must include: Dim randObject As New Random reandNum = randObject.Next(1,11)

Algorithm 1. Starting with the second digit, multiply every other digit by 2. (These will be the 2. If a product from Step 1 is greater than 9, sum the two digits in the product. For 3. Add together the results from Steps 1 and 2 and each of the digits skipped in Step 1 4. Divide the sum from Step 3 by 10 and find the remainder. If the remainder is 0, then second, fourth, sixth, and eighth digits.) example, if the product is 12, add the 1 to the 2, giving 3. (The skipped digits will be the first, third, fifth, seventh, and ninth digits.) the number is valid Number: 631620176 Step 1: 631 6 12 1+4 5 Step 2: Step 3: 6 61 Step 4: 12 3 6 30 30 Mod 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions