Explain primary problem in credit card records

Assignment Help Database Management System
Reference no: EM1349559

Q1) 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.

Reference no: EM1349559

Questions Cloud

How to be an effective communicator : Consider the following: "To be considered effective today, a communicator needs the ability to be able to gain a keen understanding of the experiences and thinking patterns of the individual or individuals that they are trying to communicate with.
Organizational cultural change-work environments change : Organizational cultural change - In your own words how have work environments changed over the past five years due to the increasing focus on teams?
What is the amplitude of the oscillation : An air-track glider is attached to a spring. The glider is pulled to the right and released from rest at. It then oscillates with a period of 1.5 and the maximum speed of 32.
Illustrate the economics department pays gordon : Gordon also works 5 hours a week for the economics department to maintain that departments web page. Illustrate the economics department pays gordon $20 per hour.
Explain primary problem in credit card records : You have a file which contains credit card records. Each record contains field for the card number, expiration date, and name of card holder. Explain what primary problem you try to solve is.
Calculate interest in loan payment : Suppose you just receive a mortgage to buy your first house from ABH bank. Do you think you are going to contribute more to decrease of your unpaid balance at the end of each month in the early years of your payments.
Strategic mangement or business : Strategic mangement or business - Explain what exactly are the key operating principles within strategic mangement or business?
How far is the raft from the pier now : The wheel of a car has a radius of 0.365 m. The engine of the car applies a torque of 284 N · m to this wheel, which does not slip against the road surface. Since the wheel does not slip, the road should be applying a force of static friction to t..
Explain health care in america is very different : Explain Health care in America is very different in rural versus urban settings. Rural health networks are often incomplete

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd