#ifndef BANKCARD_H_ #define BANKCARD_H_ /** * A bank card. Each card is associated with an account. * Given a card, it is not possible to determine the account number. * It is possible to compare two cards and determine if they are for the same account. * * This is an implementation of a bank card as described in Kleinberg & Tardos, Chapter 5, Problem 3. * @author Barbara Lerner * */ class BankCard { public: /** * Create a card for an account * @param acct the account the card is for */ BankCard(int acct); /** * Delete the bank card */ virtual ~BankCard(); /** * Compare two cards. * @param o the other card * @return true if the other card and this card are for the same account. */ virtual bool operator== (BankCard const& o); private: /** The account that the card is for. There is intentionally no getter or setter * for this field. (Pretend it is encrypted.) */ int account; }; #endif /*BANKCARD_H_*/