CreditCard.h

00001 #ifndef CREDIT_CARD_H                           // avoid repeated expansion
00002 #define CREDIT_CARD_H
00003 
00004 #include <string>                               // provides string
00005 #include <iostream>                             // provides ostream
00006 
00008 class CreditCard {
00009 
00010 
00011 // PLEASE DO NOT MAKE ANY CHANGES TO THE PUBLIC PORTION.
00012 // ALL OF YOUR MODIFICATIONS SHOULD BE KEPT PRIVATE (see end)
00013 
00014 public:
00015 
00024   CreditCard(std::string no, std::string nm, int lim, double rt, int bal=0);
00025 
00027   // accessors functions
00029 
00033   std::string getNumber() const;
00034 
00038   std::string getName() const;
00039 
00043   int getLimit() const;
00044 
00048   double getRate() const;
00049 
00053   int getCurrentBalance() const;
00054 
00060   int getStatementBalance() const;
00061 
00066   int getMinPayment() const;
00067 
00069   // update functions
00071 
00080   bool chargeIt(int price);
00081 
00093   void makePayment(int payment);
00094 
00102   int processMonth();
00103 
00104 
00105 private:
00106   // ADD WHATEVER MEMBERS YOU WISH TO SUPPORT THE CLASS
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 };
00117 
00118 
00123 std::ostream& operator<<(std::ostream& out, const CreditCard& c);
00124 #endif

Generated on Wed Jan 21 23:22:13 2009 by  doxygen 1.4.6