Checks to see if the cc number is a valid Visa number @param cc a string representing a credit card number; Sample number: 4111 1111 1111 1111(16 digits) @return true, if the credit card number is a valid VISA number, false otherwise
(String cc)
| 904 | * @return true, if the credit card number is a valid VISA number, false otherwise |
| 905 | */ |
| 906 | public static boolean isVisa(String cc) { |
| 907 | if (((cc.length() == 16) || (cc.length() == 13)) && (cc.substring(0, 1).equals("4"))) |
| 908 | return isCreditCard(cc); |
| 909 | return false; |
| 910 | } |
| 911 | |
| 912 | /** Checks to see if the cc number is a valid Master Card number |
| 913 | * |
no test coverage detected