/**************************************************************************************************/
/*                                                                                                */
/*  Name:  DarC KonQuesT                                                                          */
/*  Program:  #2                                                                                  */
/*  Date:  2005.2.10                                                                              */
/*  Purpose:                                                                                      */
/*  stockListType class declaration, functions, and friend declarations.                          */
/*                                                                                                */  
/*                                                                                                */
/*                                                                                                */
/**************************************************************************************************/
#ifndef H_stockListType
#define H_stockListType


#include <iostream>
#include <string>
#include <cassert>
#include <fstream>
#include "stockType.h"
#include "listType.h"


class stockListType: public listType<stockType> {

  //  operator overloading and friend declaration
	friend istream& operator >>(istream&, stockListType&);
	friend ostream& operator <<(ostream&, stockListType&);
	
	public:
	stockListType(int list_size); //  constructor
	~stockListType();  // destructor
	void stock_sort();  //sort stocks by percent gain/loss
  void print_by_symbol(stockListType&);  //output stocks sorted by symbol
  void print_by_gain(stockListType&);  //output stocks sorted by percent gain/loss

	private:
	int *sortIndicesGainLoss;  // pointer to index array for sorting by gain/loss
	int max_size;  // maximum size of list
  stockType stock_in;  //stockType object
  float total_assets;   //variable for holding total amount of assets $$

};

#endif

