Please help and use beginner java coding
(10 pts) Problem 2 hthe 1 cand sembers are not completety randosn seque oard insver. For example, an American EM sntist re doublied the son digit. This means the 2nd, 4th, the dicits that were aot doubled (ie, the Ist, 3rd, 5th, of to, the mumber is ralid. If the result is not a multiple of 10, the number can easily verify that the number is 15 digits or 37, and atistr the Lshn forouls (crested by to an AmEx cand nember, bere's how the Lahn formala . Duble the vah of evey other digit, startig h, Bth,10th, 12th, and 14th digit and I4th digits are Far each of the doubled aloes that exceed 9, subtract Ad up all tbe doubled values,asloag with that so on digits). i invalid. Far example, 372947128748052 is a yalid AmEx card number. (Don't long and begins with 34 or 37. To check whether it satisies the Luhn f worry, this was randomly most kely doesn't actualy belong to azyone :) You c Original number 3 729471 28748052 Double every second digit 314 218 4141 4 8 14 4 16 0 10 2 For every doubled value that exceeds 9, subtract 9: Finally add up the remaining digits: 3+5+2+9+4+5+1+4+8+5+4+7+0+1+2- 60, which is indeed a zmultiple of 10. Now that you know how to validate an AmEx card mumber, it isn't hard to generate Here's an algorithm to do so: 1. Randomly pick 34 or 37 as the first two digits 2. Randomly generate the next 12 digits; each one is between 0-9 3. Pick the last digit to make the number satisfy the Luhn formula , suppose that you've picked 34 as the first two digits, followed by 435350067544 ast the last digit r. To pick z such that the number satisfies the Lahn formula, proc the nexct follows: The number so far: Double every second digit: For every doubled value that exceeds 9, subtract 9: 3 846 5650037 148x Adding up all the digits gives 60 + 3. Remember that you want the final sum to be a mnultiple you should pick a value of z between 0-9 such that 60+ is divisible by 10. Clearly, z0 So, the final valid AmEx number is 344353500675440. satisfies this aaks the user for numbers are valid, Within your Labs folder, write a program named AmExNumberGenerator java that how many AmEx card numbers s/he wants, and then uses the generation algorithm at the top of this page to produce and show the num the screen. To verify that your gener or.html can use https://www.freeformatter.com/credit-card-number-generator-validat Side note: This lab probably seems awfully shady, but keep in mind that having valid mean much by itself. First, the total number of possible valid AmEx card numbers is 2 x 101 (2 trillion), which is far beyond the number of active AmEx accounts in the world. So it's unlikely that a randomly generated number actually belongs to anyone. Second, on the off chance that you produce someone's real card number, it's not usable without additional personal information and the security code printed on the physical card. Here's an example of what your completed program might look like when you run it. Underlined parts indicate what you type in as the program is running. How many AmEx numbers would you like to generate? Here you go, have fun: 373882560109944 346658810131142 379864135018507 345036033329317 348527636606793