Project 10 CreditCard


5/5 - (3 votes)

Project 10
Please make sure to follow the naming convention for your project. If your project does not run
because of the naming issues, you won’t receive any credit. Project10 will count as 5% towards
the final project. should include project10 Package and project10.jar
Project10 package will include ➔ Client (main method goes in here)

Project Description:
Assume we have three different credit cards: Visa, Discover, and AmericanExpress
options and all of them implement abstract class CreditCard. You need to instantiate one
of these classes, but you don’t know which of them, it depends on the user. This is a
perfect scenario for the Factory Method design pattern. Please see the UML diagram and
sample output below for details of how to implement this design.
Sample output:
In CreditCardDemo: You should be creating an instance of CardFactory and based on user input
you will instantiate the right credit card. Values for credit limit and annual Charges is hard coded.
Program is looping until user enters quit.

Scroll to Top