-6.31 (Financial: credir cand number validarion) Credit card numbers follow certain patterns. A credit card number mast have between 13 and 16 digits, It must start with 7 4 for Visa cards - 5 for Master cards - 37 for Anserican Experss cards E 6 for Discover cards. In 1954. Hans Luhn of IBM proposed an algorithm for validatiog credit card numbers. The algorithm is useful to determine whether a cand number is entered correctly, or whether a credit card is scanned correctly by a scanner, Credit card numbers are generated following this validity check, commonly known as the Zuhn check or the Mod 10 check, which can be described as follows ffor itlustration, consider the cand number 4385576018402626 ): 1. Double every second digit from right to Icft. If doubling of a digit results in a two-digit number, add up the two digits to fot a Ningle digit number. 5. If the reralt from Siep 4 is divisible by 10, the cand number is valid; othernise, it is invalid. For example, the namber 4388576018402626 is invalut, bet the number 4385576018410707 is valid. Write a program that prompts the user to enter a credit cand number as a 7 ong integer. Display whether the number is valis or invalid. Desigs your progam to use the following mecthodh: I's feturn true if the card nusber is valid %f. publie atatie boolean isvalid(1ong nueber) i" oet the result froe bted z." publie statie int sueorboublalivenelace(leng nuaber) jou Return this mubber if it is a single digit. otheraise, " return the sus of the two digits "\% public static int getbigit (int nuaber) ov Weturn sun of odd-place aigits in munter public static int sunoroddPlace(leng nunter) fo faturn true if the peaber of is a pritfo far nyaber +l. public static boelean prefixhatched(long nunber, ist d). in. Hoturi the ninter of gigits in do? gublic statie fat getsize(lang d) for Boturn the firat in nusber of digits. fran mobre if the public statie long getpretix(long nuaberg int k ). Here are sample ruas of the prugrant. (Viss may atw implensene ithis program by -6.31 (Financial: credir cand number validarion) Credit card numbers follow certain patterns. A credit card number mast have between 13 and 16 digits, It must start with 7 4 for Visa cards - 5 for Master cards - 37 for Anserican Experss cards E 6 for Discover cards. In 1954. Hans Luhn of IBM proposed an algorithm for validatiog credit card numbers. The algorithm is useful to determine whether a cand number is entered correctly, or whether a credit card is scanned correctly by a scanner, Credit card numbers are generated following this validity check, commonly known as the Zuhn check or the Mod 10 check, which can be described as follows ffor itlustration, consider the cand number 4385576018402626 ): 1. Double every second digit from right to Icft. If doubling of a digit results in a two-digit number, add up the two digits to fot a Ningle digit number. 5. If the reralt from Siep 4 is divisible by 10, the cand number is valid; othernise, it is invalid. For example, the namber 4388576018402626 is invalut, bet the number 4385576018410707 is valid. Write a program that prompts the user to enter a credit cand number as a 7 ong integer. Display whether the number is valis or invalid. Desigs your progam to use the following mecthodh: I's feturn true if the card nusber is valid %f. publie atatie boolean isvalid(1ong nueber) i" oet the result froe bted z." publie statie int sueorboublalivenelace(leng nuaber) jou Return this mubber if it is a single digit. otheraise, " return the sus of the two digits "\% public static int getbigit (int nuaber) ov Weturn sun of odd-place aigits in munter public static int sunoroddPlace(leng nunter) fo faturn true if the peaber of is a pritfo far nyaber +l. public static boelean prefixhatched(long nunber, ist d). in. Hoturi the ninter of gigits in do? gublic statie fat getsize(lang d) for Boturn the firat in nusber of digits. fran mobre if the public statie long getpretix(long nuaberg int k ). Here are sample ruas of the prugrant. (Viss may atw implensene ithis program by