Starting from:

$30

Project 10 CECS277

Project 10
CECS277
Submit project10.zip folder before the deadline
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.
Project10.zip should include project10 Package and project10.jar
Project10 package will include
CreditCardDemo.java ➔ Client (main method goes in here)
CreditCard.java
AmericanExpressCreditCard.java
DiscoverCreditCard.java
VisaCreditCard.java
CardFactory.java
DiscoverFactory.java
VisaFactory.java
AmericanExpressFactory.java
Plagiarism/Academic Integrity Policy
Cheating and plagiarism will not be tolerated in this course. Students are to do their own assignments. Cases
of copying, cheating, and plagiarism of assignments and/or tests, and any other violations, will be pursued to
the maximum extent permitted by the University, which can include expulsion from the University. This
applies equally to students who intentionally assist other students in academic dishonesty.
Any form of plagiarism or cheating will result in a failing grade on the assignment (at a minimum) and
could result in a failing grade in the course or even university disciplinary action.
To learn more about the University policy on Cheating and Plagiarism, visit:
Academic Information and Regulations-Cheating and Plagiarism
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.
UML DIAGRAM
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.

More products