credit_card_numbers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
credit_card_numbers [2025/06/22 10:11] – frchris | credit_card_numbers [2025/06/22 11:15] (current) – [Generating Credit Card Numbers] frchris | ||
---|---|---|---|
Line 4: | Line 4: | ||
a customer or a clerk hasn't made a mistake typing in the long 16 digit number. In fact even magnetic strip fail, and errors in transmission from a chip reading devices can also fail to send the correct number. | a customer or a clerk hasn't made a mistake typing in the long 16 digit number. In fact even magnetic strip fail, and errors in transmission from a chip reading devices can also fail to send the correct number. | ||
- | They use something called [[https:// | + | They use something called [[https:// |
Line 10: | Line 10: | ||
For this lab, we will write and test the validity of a 16 digit credit card. | For this lab, we will write and test the validity of a 16 digit credit card. | ||
- | ===== Generating ===== | + | ===== Generating |
- | The practice of [[ extreme programming ]] starts with writing the code to test if | + | The practice of TDD (Test Driven Development) |
- | Here is a [[https:// | + | This means we need to get some valid and invalid numbers and see if our code can spot the difference. |
+ | |||
+ | Here is a [[https:// | ||
+ | |||
+ | |||
+ | ===== Checking with Luhn's ===== | ||
+ | |||
+ | |||
+ | ===== Finding a Better Way ===== | ||
+ | |||
+ | [[https:// | ||
credit_card_numbers.1750601500.txt.gz · Last modified: 2025/06/22 10:11 by frchris