Checks to see if the cc number is a valid Discover number @param cc - a string representing a credit card number; Sample number: 6011000000000004(16 digits) @return true, if the credit card number is a valid Discover card number, false otherwise
(String cc)
| 964 | * @return true, if the credit card number is a valid Discover card number, false otherwise |
| 965 | */ |
| 966 | public static boolean isDiscover(String cc) { |
| 967 | String first4digs = cc.substring(0, 4); |
| 968 | |
| 969 | if ((cc.length() == 16) && (first4digs.equals("6011"))) |
| 970 | return isCreditCard(cc); |
| 971 | return false; |
| 972 | } |
| 973 | |
| 974 | /** Checks to see if the cc number is a valid EnRoute number |
| 975 | * @param cc - a string representing a credit card number; Sample number: 201400000000009(15 digits) |
no test coverage detected