Question: A useful technique for catching typing errors is to use a check digit. For example. International Article Number 13 (EAN 13) uses the last digit

A useful technique for catching typing errors is to use a check digit. For example. International Article Number 13 (EAN 13) uses the last digit (also known as checkdigit) to validate the correctness of the first 12 digits. If EAN 13 is 4006381333931 the check code is computed as follows: The nearest multiple of 10 that is equal or higher than the sum, is 90. Subtract them: 90 - 89 = 1, this is the last digit of the barcode. Write a Java program that asks the user for a EAN 13 and validates it as either correct or incorrect (display a message accordingly). Your program should continue to run, to validate multiple EAN 13 numbers, until the user decides to exit the program, by entering 'Q' or 'Quit'. Your program is allowed to use any of the concepts covered through the first 8 chapters and topics from the appendices from our class text book. Comment your code and use procedural decomposition problem solving techniques. Attach your source-code file (*.java) for submitting this exercise. Please note that there are no makeups or late submissions allowed for the graded weekly discussions and exercises. Please refer to our class syllabus for the policy on this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
