/**************************************************************************************************/
/*                                                                                                */
/*  Name:  DarC KonQuesT                                                                          */
/*  Program:  #2                                                                                  */
/*  Date:  2005.2.7                                                                               */
/*  Purpose:                                                                                      */
/*  Class stockType declaration	                                                                  */
/*                                                                                                */
/**************************************************************************************************/
#ifndef H_stockType
#define H_stockType


#include <cassert>
#include <fstream>
#include "listType.h"
#include <string>
#include <iomanip>

using namespace std;

class stockType{
	
  //Insertion/extraction overloading and friend declaration 
  friend ostream& operator<<(ostream&, const stockType&);
  friend istream& operator>>(istream&, stockType&);
	
	public:
	
      // relational operator overloading
      bool operator<(const stockType&) const;
	    bool operator>(const stockType&) const;
    	bool operator==(const stockType&) const;
           
    	stockType(); // constructor
    	float add_assets(); // calculates assests $$ for current stock
	    float percent_gain(); // calculates percent gain/loss for current stock
        
  protected:
		string symbol;  //  stock symbol
		float opening_price;  // todays stock opening price
		float closing_price;  // todays stock closing price
		float today_high;  // todays stock high price
		float today_low;  // todays stock low price
		float prev_close;  // previous closing price of stock
		int volume;  // amount of stocks owned
	
};
		
#endif	

