// Stock.cpp: implementation of the Stock class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Stock.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Stock::Stock()
{

}

Stock::~Stock()
{

}

Stock::Stock(double ns, double pps) : numberShares(ns), sharePrice(pps)
{

}

double Stock::presentValue()
{
	return numberShares * sharePrice;
}

void Stock::setSharePrice(double np)
{
	sharePrice = np;
}

ostream & operator <<(ostream &os, const Stock & s)
{
	return os << "Stock: numShares=" << s.numberShares << "\tpricepershare=" << s.sharePrice;

}
