Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Term Paper Expert

You have a file that contains credit card records. Each record contains a field for the card number, the expiration date, and the name of the card holder. In your system you have the following class structure for the credit cards: 

a class CreditCard, 

classes VisaCC, MasterCC, AmExCC that are all subclasses of CreditCard, 

you assume more subclasses for other credit card types will be added later on. 

you now have to design the method(s) (and maybe additional classes) that reads a record from the file, verifies that the credit card number is a possible account number, and creates an instance of the appropriate credit card class. What design patterns could you use for that? 

important details: Credit card numbers cannot exceed 19 digits, including a single check digit in the rightmost position. The exact algorithm for calculating the check digit as defined in ISO 2894/ANSI 4.13 is not important for this assignment. You can also determine the card issuer based on the credit card number:

MasterCard First digit is a 5, second digit is in range 1 through 5 inclusive. Only valid length of number is 16 digits.

Visa First digit is a 4. Length is either 13 or 16 digits.

AmericanExpress First digit is a 3 and second digit a 4 or 7. Length is 15 digits.

Discover First four digits are 6011. Length is 16 digits.

Deliverables: 

- Describe what the primary problem you try to solve is. 

- Describe what are the secondary problems you try to solve (if there are any). 

- Describe what design pattern(s) you use how (use plain text and/or UML diagrams). 

- Describe the consequences of using this/these pattern(s).

Hint: you face here (at least) two problems, one has to do with how you figure out what kind of card a specific record is about, the other one with how you create the appropriate objects. Look at behavioural patterns and at creational patterns.

Term Paper, Writing

  • Category:- Term Paper
  • Reference No.:- M961652

Have any Question?


Related Questions in Term Paper

Questionthe outline will consist of 4-5 pagesthe title page

Question: The Outline will consist of 4-5 pages. The Title Page and Reference Page are not included in the page count. The paper/outline describes your final research project. Each major section within your final project ...

Economic physical and environmental impacts of bhopal

Economic, physical and environmental impacts of Bhopal disaster

Need to demonstrate the acquired essential skills and

Need to demonstrate the acquired essential skills and knowledge in the subject matter - Criminal Justice

Need to demonstrate the acquired essential skills and

Need to demonstrate the acquired essential skills and knowledge in the subject matter. Subject - Criminal Justice

Literature review on the topictopic - the convergence of

Literature Review on the topic Topic - The convergence of transportation congestion and transportation security at a U.S. seaport. In 2009 the American Recovery and Investment Act was introduced to fund for the surface t ...

Special topics in criminal justicemanagement of critical

Special Topics in Criminal Justice Management of Critical Incidents Operations and Personnel Need to demonstrate the acquired essential skills and knowledge in the subject matter. Term Paper

Need to demonstrate the acquired essential skills and

Need to demonstrate the acquired essential skills and knowledge in the subject matter - Criminal Justice

You need to write an essay for critical reason class in apa

You need to write an essay for critical reason class in APA format. The claim that you want to do is: Abortion

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As