|
CPSC 211: Credit Card Example Challenges |
Consider the credit card example posted here and extended in the
following three ways:
- Challenge #1: Support a platinum card that provides twice the points for
airline travel purchases and give john a platinum card. Note all
transactions whose descriptions have "air" in them are recognized as airline
purchases.
- Challenge #2: Create an appropriate exception for when the number of
transactions exceeds the Transaction Limit. Catch this exception in Driver
and if the exception occurs, write a suitable message to System.err.
- Challenge #3: Provide an implementation of equals on CardHolder so that
the cardholders mary and mary2 match.