Assume you are working as a developer in a bank, and you have been asked to develop a program to validate credit card numbers. Assume also that each credit card number consists of 8 digits. The following method is used to verify that the credit is valid or not: - Starting from the rightmost digit, form the sum of every other digit. For instance, if the credit card number is 43589795, then you form the sum 5 + 7 + 8 + 3 = 23. - Double each of the digits that were not included in the preceding step. Add all digits of the resulting numbers. Considering for example the above credit card number 43589795, doubling the digits starting from the next-to-last one, yields 18 18 10 8. Adding all digits in these values yields 1 + 8 + 1 + 8 + 1 + 0 + 8 = 27 - Add the sum of the two preceding steps. If the last digit of the resulting sum is 0, the credit card number is valid; otherwise, it is invalid. In our case, 23 + 27 = 50, so the number is valid.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Assume you are working as a developer in a bank, and you have been asked to develop a program
to validate credit card numbers. Assume also that each credit card number consists of 8 digits. The
following method is used to verify that the credit is valid or not:


- Starting from the rightmost digit, form the sum of every other digit. For instance, if the
credit card number is 43589795, then you form the sum 5 + 7 + 8 + 3 = 23.


- Double each of the digits that were not included in the preceding step. Add all digits of the
resulting numbers. Considering for example the above credit card number 43589795,
doubling the digits starting from the next-to-last one, yields 18 18 10 8. Adding all digits
in these values yields 1 + 8 + 1 + 8 + 1 + 0 + 8 = 27


- Add the sum of the two preceding steps. If the last digit of the resulting sum is 0, the credit
card number is valid; otherwise, it is invalid. In our case, 23 + 27 = 50, so the number is
valid.

7. On Private Sub Frm_Your_Id_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

a. Form text: Your id + today’s date

8. Private Sub txtcname_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtcname.Leave
a. Textbox customer name cannot be empty, It must start with an alphabet and must consist of two parts otherwise display message, Invalid name.


9. Private Sub txtcnumber_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtcnumber.Leave 
a. Card number length must be numeric and eight digits otherwise display message Invalid card number.

10. Private Sub btnvc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnvc.Clicka. Determine the credit card approved status as “YES” and display age of the card on Approve form. As shown below in the sample output.

Form Approve:
11. Private Sub btnexitapprove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexitapprove.Click
a. Close form (back to previous form ) 

Form YourId:

12. Private Sub btnreset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnreset.Click
a. Clear all textboxes. 
b. Set datetimepicker date as minimum date. 

13. Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
a. Close Application 

 

 

Microsoft Word - HW2_COMP20 x b Answered: Assume you are worki x
O
how to make a form output in vis x +
O X
O File | C:/Users/User/Desktop/Spring%2022/Visual%20Basic/HW1_COMP2002_SP22_.pdf
O Paused
Microsoft Word - HW2_COMP2002.docx
4 / 4 |
+ | 8 O
110%
Sample Output Screens:
E 123456 2/26/2022 8:39:37 PM
123456 2/26/2022 8:39:37 PM
яВС Стedit Card
ABC Credit Card
Customer Name 2asdf asd
Customer Name Ahmed Al Kindi
Invalid input
Credt Card #
Date of Issue
Friday
January 1, 2010
Credt Card # 543234
Please Enter eight digits
Validate Card
Reset
Ext
Date of Issue Friday . January 1,2010
O
Invalid name
OK
Name must start with an alphabet and consist of two parts
Validate Card
Reset
Ext
OK
123456 2/26/2022 8:39:37 PM
FrmApprove
ЯВС Стеdit Card
Customer Name Ahmed Al Kindi
Valid NO
Credt Card # 54323478
Age of the card Not Available
Date of Issue
Friday
January 1, 2010
Ext Approve
Fom
Validate Card
Reset
Exit
9:28 PM
P Type here to search
P3
IJ
82°F A
a 4) ENG
3/12/2022
124
Transcribed Image Text:Microsoft Word - HW2_COMP20 x b Answered: Assume you are worki x O how to make a form output in vis x + O X O File | C:/Users/User/Desktop/Spring%2022/Visual%20Basic/HW1_COMP2002_SP22_.pdf O Paused Microsoft Word - HW2_COMP2002.docx 4 / 4 | + | 8 O 110% Sample Output Screens: E 123456 2/26/2022 8:39:37 PM 123456 2/26/2022 8:39:37 PM яВС Стedit Card ABC Credit Card Customer Name 2asdf asd Customer Name Ahmed Al Kindi Invalid input Credt Card # Date of Issue Friday January 1, 2010 Credt Card # 543234 Please Enter eight digits Validate Card Reset Ext Date of Issue Friday . January 1,2010 O Invalid name OK Name must start with an alphabet and consist of two parts Validate Card Reset Ext OK 123456 2/26/2022 8:39:37 PM FrmApprove ЯВС Стеdit Card Customer Name Ahmed Al Kindi Valid NO Credt Card # 54323478 Age of the card Not Available Date of Issue Friday January 1, 2010 Ext Approve Fom Validate Card Reset Exit 9:28 PM P Type here to search P3 IJ 82°F A a 4) ENG 3/12/2022 124
Microsoft Word - HW2_COMP20 x b Answered: Assume you are worki x
O
how to make a form output in vis x +
O X
O File | C:/Users/User/Desktop/Spring%2022/Visual%20Basic/HW1_COMP2002_SP22_pdf
O Paused
Microsoft Word - HW2_COMP2002.docx
4 4
+ |
110%
OK
123456 2/26/2022 8:39:37 PM
FrmApprove
O X
явС Стебit Card
Customer Name Ahmed Al Kindi
Vald NO
Credt Card # 54323478
Age of the card Not Available
Date of Issue
Friday
January 1, 2010
D-
Ext Approve
Fom
Validate Card
Reset
Exit
Click
123456 2/26/2022 8:49:17.
FrmApprove
явС Стеdit Card
Customer Name Ahmed Al Kindi
Valid YES
Credt Card # 43589795
Age of the card 7 Years
Date of Issue Thunday . February 5, 2015
O-
Exit Approve
Fom
Validate Card
Reset
Ext
IJ
9:28 PM
O Type here to search
82°F A
a 4) ENG
3/12/2022
124
Transcribed Image Text:Microsoft Word - HW2_COMP20 x b Answered: Assume you are worki x O how to make a form output in vis x + O X O File | C:/Users/User/Desktop/Spring%2022/Visual%20Basic/HW1_COMP2002_SP22_pdf O Paused Microsoft Word - HW2_COMP2002.docx 4 4 + | 110% OK 123456 2/26/2022 8:39:37 PM FrmApprove O X явС Стебit Card Customer Name Ahmed Al Kindi Vald NO Credt Card # 54323478 Age of the card Not Available Date of Issue Friday January 1, 2010 D- Ext Approve Fom Validate Card Reset Exit Click 123456 2/26/2022 8:49:17. FrmApprove явС Стеdit Card Customer Name Ahmed Al Kindi Valid YES Credt Card # 43589795 Age of the card 7 Years Date of Issue Thunday . February 5, 2015 O- Exit Approve Fom Validate Card Reset Ext IJ 9:28 PM O Type here to search 82°F A a 4) ENG 3/12/2022 124
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY