This is an old revision of the document!
Table of Contents
Credit Card Numbers
Credit card numbers are not random. In addition to bank and account number there are extra digits. 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 Luhn' Algorithm to detect errors. Here is a video that explains how to see if a credit card is valid.
For this lab, we will write and test the validity of a 16 digit credit card.
Generating Credit Card Numbers
The practice of TDD (Test Driven Development) starts with writing the code to test our Validity software. This means we need to get some valid and invalid numbers and see if our code can spot the difference.
Here is a video that explains what we need to do