Java Reference
In-Depth Information
public void setClosingPrice( double c)
{
closingPrice = c;
}
public void setNumberOfShare( int ns)
{
numberOfShares = ns;
}
public String getName()
{
return name;
}
public int getPreviousPrice()
{
return previousPrice;
}
public double getClosingPrice()
{
return closingPrice;
}
public int getNumberOfShare()
{
return numberOfShares;
}
public double shareValues()
{
return numberOfShares * closingPrice;
}
public double percentGain()
{
return (previousPrice - closingPrice) / previousPrice *
100;
}
Search WWH ::




Custom Search