Advertisement
Guest User

stocklist.h

a guest
Jul 30th, 2012
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #ifndef STOCKLIST
  2. #define STOCKLIST
  3.  
  4. #include "stock.h"
  5.  
  6. class StockList
  7. {
  8.     private:
  9.         Stock * list;       //dynamic array of stocks
  10.         unsigned int counter;   //keeps a count of items in the list so we know where to insert
  11.         float total_assets; //keeps a total assets amount of all stocks in the list
  12.         void swap(int a, int b);
  13.         void add(Stock s);
  14.  
  15.     public:
  16.         StockList();
  17.         ~StockList();
  18.         bool load(const char* filename);
  19.         unsigned int listlength() const;
  20.         void print() const;
  21.         void sort();
  22. };
  23. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement