Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The last digit of a credit card number is the check digit, which protects againts transaction errors. The following method is used to veryfy credit
The last digit of a credit card number is the check digit, which protects againts transaction errors. The following method is used to veryfy credit card numbers. Follwing steps explains the algorithm in determining if a credit card number is a valid card. . Starting from the right most digit, form the sum of every other digit. For example, if the credit card is number is 3125145643589795 then you form the sum 5+7+8+3+6+4+5+1 = 39 Double each digit that we have not included in the preceding step. Add all digits of resulting numbers. For example, with the number given above, doubling the digits starting with next to last one, yields 18, 18, 10, 8, 10, 2, 4,6. Adding all digits in these values yield 1+8+1+8+1+0+8+1+0+2+4+6 = 40 . Add sum of the two preceding steps. If the last digit of the result is zero, then the number is valid number The program asks the user 16 digit credit card number and the printout if the credit card is valid or invalid card a) [30 Pts] How do you test this application using EP technique ? Identify your EPs. Write test cases based on your EPs (use strong robust classification). Points will be given based on the effectiveness and quality of your test cases and equivalent partitions. Page 3 of 5 b) [20 Pts] Develop Junit test cases based on your test cased listed above and test the java program given. This java program has two defects. Identify defects in this program (If your test cases can catch them, you have developed good set of test cases!). You can assume that the user will enter a 16 digit number. No need to consider other types of inputs such as strings, characters ...etc. The last digit of a credit card number is the check digit, which protects againts transaction errors. The following method is used to veryfy credit card numbers. Follwing steps explains the algorithm in determining if a credit card number is a valid card. . Starting from the right most digit, form the sum of every other digit. For example, if the credit card is number is 3125145643589795 then you form the sum 5+7+8+3+6+4+5+1 = 39 Double each digit that we have not included in the preceding step. Add all digits of resulting numbers. For example, with the number given above, doubling the digits starting with next to last one, yields 18, 18, 10, 8, 10, 2, 4,6. Adding all digits in these values yield 1+8+1+8+1+0+8+1+0+2+4+6 = 40 . Add sum of the two preceding steps. If the last digit of the result is zero, then the number is valid number The program asks the user 16 digit credit card number and the printout if the credit card is valid or invalid card a) [30 Pts] How do you test this application using EP technique ? Identify your EPs. Write test cases based on your EPs (use strong robust classification). Points will be given based on the effectiveness and quality of your test cases and equivalent partitions. Page 3 of 5 b) [20 Pts] Develop Junit test cases based on your test cased listed above and test the java program given. This java program has two defects. Identify defects in this program (If your test cases can catch them, you have developed good set of test cases!). You can assume that the user will enter a 16 digit number. No need to consider other types of inputs such as strings, characters ...etc
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started