/**
A calculator whose value which can be changed by addition, subtraction,
multiplication, division, or clearing.
@version 1.0 2011-02-21
@author M. Arkin
*/
public class BasicCalculator
{
// constructors
/**
Constructs a calculator with a value of 0.
*/
public BasicCalculator()
{
} // end of constructor BasicCalculator()
// accessors
/**
Returns the value of this calculator.
@return the value
*/
public double getValue()
{
} // end of method getValue()
/**
Returns a string representation of this calculator.
@return a string representing this calculator
*/
public String toString()
{
} // end of method toString()
// mutators
/**
Adds to the value of this calculator.
@param addend the amount to be added
*/
public void add(double addend)
{
} // end of method add(double addend)
/**
Resets the value of this calculator.
@return true
if the value was cleared, else false
*/
public boolean clear()
{
} // end of method clear()
/**
Divides the value of this calculator.
@param divisor the amount by which to divide
(precondition: divisor
must be non-0)
*/
public void divide(double divisor)
{
} // end of method divide(double amount)
/**
Multiplies the value of this calculator.
@param factor the amount by which to multiply
*/
public void multiply(double factor)
{
} // end of method multiply(double factor)
/**
Subtracts from the value of this calculator.
@param subtrahend the amount to be subtracted
*/
public void subtract(double subtrahend)
{
} // end of method subtract(double subtrahend)
// instance variables
private double value;
} // end of class BasicCalculator