Skip to content

Commit 903664e

Browse files
committed
adding new take-home exercises
1 parent b856661 commit 903664e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Android Credit Card Input Exercise
2+
3+
<img align="right" src="CreditCardInputExercise.gif" alt="A general idea of how it looks/works" title="A general idea of how it looks/works">
4+
5+
### Requirements
6+
7+
Basically, the Company asked to create an Android "screen" that would allow a user to enter and submit the
8+
following data from an American Express, Discover, MasterCard, or Visa credit card:
9+
10+
- Credit card number
11+
- Expiration date (MM/YY format)
12+
- CVV security code
13+
- First name
14+
- Last name
15+
16+
If any of the entered data was invalid, the user needed to be notified so the Company's Dev-Team could correct it.
17+
In addition to not having issues like empty fields or a badly-formed or expired expiration date,
18+
credit card data also had to meet these criteria to be considered valid:
19+
20+
- Credit card numbers needed to be in valid American Express, Discover, MasterCard, or Visa format according
21+
to the specs listed on https://www.cybersource.com/developers/getting_started/test_and_manage/best_practices/card_type_id/
22+
- Credit card numbers also needed to pass Luhn validation - see https://en.wikipedia.org/wiki/Luhn_algorithm
23+
- The CVV had to meet these criteria: https://www.cvvnumber.com/cvv.html
24+
- First and last names could only contain characters that were "alphabetical and spaces". _(It's true that many
25+
people have hyphens in their names as well, but for this assignment I wasn't going to go past what was called
26+
for in the specs, ditto for dealing with "international characters" even though I have one in my own first name.)_
27+
28+
When the user submitted valid credit card data, the app should pop up an alert dialog notifying them that the
29+
payment was successful.

0 commit comments

Comments
 (0)