An assignment I'm working on requires me to write a method for the sole purpose of calling that method in a later method. As such I am required to write the first method to not display anything on screen and then I need to comment the calculation within the method. This is what I have so far.
public double calcProfit ()
{
// double totalProfit = sellingPrice - purchasePrice;
}
public double calcTotalProfit ()
{
double totalProfit = calcProfit () * quantitySold;
return totalProfit;
}
I've tried writing calcProfit () as a void method, but you can't call a void method. But I don't know what to put for the return value. Any help would be appreciated.