I need Help with this assignment it has specifc needs.

timer Asked: Apr 9th, 2017

Question description

Each credit card number issued by Vita Credit contains five digits. The last digit is

determined by multiplying the second and fourth digit by three and then adding the

products to the first and third digits. The last digit in the sum is then appended to the first

four digits in the credit card number, as shown in the following example.

Fifth Digit Algorithm

First four digits in credit card number: 1 3 5 7

Step 1: Multiply the second and fourth digits by 2: 3*2 and 7*2

Result 1 6 5 14

Step 2: Add the numbers together: 1 + 6 + 5 + 14 = 26

Step 3: Take the last digit in the sum and append it to the first four digits, resulting in the

final credit card number: 13576

In this assignment, you are required to complete the given incomplete application which

takes four digits and then calculate the fifth digit and display the credit card number. The

name of the solution, project, and form file are Vita Solution, Vita Project, and Main

Form.vb, respectively.

The interface of this application is shown as follows:

look at Vita Gif

Use the provided interface for this assignment.

The application includes following Function and Sub Procedures.

Function/Sub procedure Description

exitButton_Click Define exitButton click event.

firstFourTextBox_Enter Select existing text of the firstFourTextBox.

firstFourTextBox_KeyPress Allows only numbers and the Backspace key for the


firstFourTextBox_TextChanged Clear the content of the firstFourTextBox.

creditNumberButton_Click Define creditNumberButton click event (Determines the fifth

digit in a credit card number).

You must complete the following parts in the given application.

1. Declare two String variables called creditNum, fifthDigit and an integer variable

called sumOfDigits. (9 points)

2. Write code to get the value at firstFourTextBox to the variable creditNum. (5 points)

3. Fill the two blanks in if statement to check whether the creditNum is a four digit

string. (6 points)

4. Write code to get the summation of four digits in variable creditNum to the variable

sumOfDigit. You must follow the above given scenario to get the summation.

(10 points)

5. Write code to find the fifth digit and store in the variable fifthDigit. (10 points)

6. Write code to append fifth digit to first four digits in the variable creditNum.

(10 points)

Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors