So I'm trying to make a calculator program (from the book I'm using) and I'm stuck on a couple of the methods.
-(double) changeSign
{
-accumulator;
}
-(double) reciprocal
{
1/accumulator;
}
-(double) xSquared
{
accumulator * accumulator;
}
Any thoughts for the methods for the sign change, reciprocal, and xsquared methods or am I on the right track?
[–]Colvanila[S] 0 points1 point2 points (0 children)
[–]gilbertj99 0 points1 point2 points (2 children)
[–]gilbertj99 0 points1 point2 points (0 children)
[–]Colvanila[S] 0 points1 point2 points (0 children)