Main Page | Class List | File List | Class Members

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 MODIFICATION SHOULD BE KEPT PRIVATE (see end)
00013 
00014 public:
00015 
00024   CreditCard(std::string no, std::string nm, int lim, double rt, double 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   double getCurrentBalance() const;
00054 
00058   double getPreviousBalance() const;
00059 
00063   int getMinPayment() const;
00064 
00066   // update functions
00068 
00079   bool chargeIt(double price);
00080 
00090   void makePayment(double payment);
00091 
00098   int endOfMonth();
00099 
00100 
00101 private:
00102   // ADD WHATEVER MEMBERS YOU WISH TO SUPPORT THE CLASS
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 };
00111 
00112 
00117 std::ostream& operator<<(std::ostream& out, const CreditCard& c);
00118 #endif

Generated on Tue Jan 23 15:52:49 2007 by doxygen 1.3.4