/*********************** * CCard - methods to determine if a String of digits could be a valid * credit card number, of various types. * * @author your name here! * @version 2019-Sep-?? * @see https://www.radford.edu/~itec120/2019fall-ibarland/Homeworks/CCard/CCard.html * ***********************/ public class CCard extends Object120 { // This is a helper method. The other methods // in this class can call it to strip dashes and spaces out of a String. // It takes a String that might have dashes and spaces in it, and it returns // a new String that is the same as the given String except it doesn't have // any dashes or spaces in it. static String withoutDashesAndSpaces(String s) { } // This helper method answers if the given String contains only digits. static boolean isAllDigits(String s) { } // This are the methods that will be tested to Grade HW3. // Therefore, do NOT change the method headers. /** Return whether `ccNum` is a valid Visa card-number. * All Visa card numbers start with a 4. New cards have 16 digits. Old cards have 13. * @return whether `ccNum` is a valid Visa card-number. * @param ccNum the credit-card-number to validate. */ static boolean isValidVisa(String ccNum) { } /** Return whether `ccNum` is a valid AmEx (American Express) card-number. * All AmEx card numbers start with 34 or 37 and have 15 digits. * @return whether `ccNum` is a valid AmEx card-number. * @param ccNum the credit-card-number to validate. */ static boolean isValidAmEx(String ccNum) { } /** Return whether `ccNum` is a valid Discover card-number. * All Discover card numbers begin with 6011 or 65. All have 16 digits. * @return whether `ccNum` is a valid Discover card-number. * @param ccNum the credit-card-number to validate. */ static boolean isValidDiscover(String ccNum) { } /** Return whether `ccNum` is a valid card-number of any type (Visa, AmEx, Discover). * @return whether `ccNum` is a valid card-number of any type. * @param ccNum the credit-card-number to validate. */ static boolean isValidCCard(String ccNum) { } /** Interactively prompt the user for a card-number, and report * which card-type it is (if any). * @see https://www.radford.edu/~itec120/2019fall-ibarland/Homeworks/CCard/CCard.html */ public static void main( String[] args ) { } }