Code Challenge: Program 3:you
Code Challenge: Program 3:you
Program 3:You
details.
need to design a class structure referring to the following
The Payment Gateway companies make use of APIs offered by the Credit Card companies. There are two main card
types which are offered to the customers are Master and Visa. Although the cards offer different facilities but the
API methods called by the Payment Gateway companies are standardized (thus need to have same name and
parameters but can have different processing details). However the methods for customer dealings are all specific to
the card types this means they can differ in their name and numbers for individual card types.
You need to make the four classes as follows
1. PaymentGateway - The class uses the methods offerred by CreditCard class while they interact with customers.
2. CreditCard : It offers four pure virtual methods – cardAuthent(), getInvDetails(), processInvoices(),
UpdateAccount()
3. MasterCard : Inherits CreditCard class
4. VisaCard: Inherits CreditCard class
You are supposed to make only the class structures and successfully compile them. None of the methods need to
have any details of actual processing (methods details may be highly complicated).