Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the Luhn formula, write a program in Java that asks the user for how many AmEx card numbers s/he wants and then uses the
Using the Luhn formula, write a program in Java that asks the user for 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 numbers on this screen.
thank you
(10 pts) Problem 2 Exprens card ounber zoust be 15 (created by 1BM oard isost. Fue or 3 quenc ther follose certain rules Coudic A te meoand digit. The mesns the 2nd, th, Ri the dete that aese sot doubled Ge, the ist, rd, sth, this was randomly generated eientist Hans Peter Luhn in the 1980 Whee appdnd to ae AroEx ond aamber, beres bow the Lohn Dohie the sue af every other digit, starting from the ech, seh, s, t, and 14th digits are doubled . Fr ch of the doobled values that cxceed 9, sunct 9 - Addp al the doubled adues, one with the digits that were . Ithe nesult is a oult of 10, the etanple 372947129748052 is a vd AEx card munber. (Dop't warr actoxly belang to suzvone) Long and begins wich 34 or 3T Ta check wiether it satasies the Laha formula: evore You can easly verity that the mumber is 15 digits mmber is 15 digits easily Origual nrmber Double every seoond digit For every doubled value that exceeds 9, subtract Finally add up the remaining digit: 3-5+2+98+5+47+0+1+2 60, which is indeed a multiple of 10. Double every secand digit For every donhled value that exeseds 0, ubtract 9r Adding up all the digite gives 60 + # So. the final valid AmEx nutuber i Rsane ber thot W wut the full Bgm to be a mitaple of 10.0 your Lab5 folder how many you can use hitps://wwa.freef AmEx mambers code printed on the physical card indicate what you type in as the progrsan is runting 379864135018507 Submission Make sure that your Labs folder contains all your java files from this assigament. Zip the Labs folderStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started