Sale!

Project 10 CECS 277 solution

Original price was: $35.00.Current price is: $30.00.

Download Details:

  • Name: Project10-wrgite.zip
  • Type: zip
  • Size: 326.80 KB

Category:

Description

5/5 - (3 votes)

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

Project 10 CECS 277

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.

Project 10 CECS 277