Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design Patterns ( JAVA or C++ ) . Most credit cards comply with ANSI Standard X4.13-1983. The first digit in your credit card number means:

image text in transcribed

Design Patterns ( JAVA or C++ )

. Most credit cards comply with ANSI Standard X4.13-1983. The first digit in your credit card number means: travel/entertainment cards (such as American Express (Amex) and Diners Club) if 3 Visa if 4 MasterCard if 5 In Amex cards, 3rd and 4 digits indicates the currency, 54 through 11" are the account number, 12 through 14* are the card number within the account and 15 digit is a check digit. Amex cards have only 15 digits. In Visa cards, digits two through six are the bank number, digits seven through 12 or seven through 15 are the account number and digit 13 or 16 is a check digit. In MasterCard, digits two and three, two through four, two through five or two through six are the bank number (depending on the whether digit two is a 1, 2, 3 or other). The digits after the bank number up through digit 15 are the account number, and digit 16 is a check digit. 1. Propose and adapt an existing design pattern to parse a given credit card number to one of Amex, Visa or MasterCard. Separate the possible candidates of bank numbers, account numbers, and check digits. 2. Prepare a report to justify why you choose the pattern. Your report must not exceed 300 words. Add as a separate PDF file to your final ZIP. 3. Draw the UML Class Diagram of your proposed design. 4. Implement your design sticking with your UML Class Diagram. A sample run for an Akbank VISA Test Card might look like this: SAMPLE RUN: Enter credit card number: 4355 0843 5508 4358 Card type: VISA Possible bank numbers: 35508 Possible account numbers: 435508, 435508435 Possible check digits: 4, 8 NOTES: If you find any non-clear parts in the assignment, you can make reasonable assumptions about them and implement according to your assumptions. Your programs will be evaluated by both following your UML Class Diagrams and the answer key. Therefore, make sure to follow your UML Class Diagrams while implementing your proposed solution. Upload your report, your class files, and your UML Class Diagram as SVG or high-res PNG. You can compress your files as a ZIP file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

What do you mean by dual mode operation?

Answered: 1 week ago

Question

Explain the difference between `==` and `===` in JavaScript.

Answered: 1 week ago