I need to create a calculator class for my basic calculator application that will implement the functions of the Calculator?
The design of the calculator class should be in this
This is what I have so far, am so confused?
PHP Code:
public class Calculator
{
private decimal currentValue;
public Calculator()
{
}
public Calculator(decimal currentValue)
{
this.CurrentValue = currentValue;
}
public decimal CurrnetValue
{
get
{
return currentValue;
}
set
{
currentValue = value;
}
}
public decimal Add(decimal operand1, decimal operand2)
{
return operand1 + operand2;
}
public decimal Subtract(decimal operand1, decimal operand2)
{
return operand1 - operand2;
}
public decimal Multiply(decimal operand1, decimal operand2)
{
return operand1 * operand2;
}
public decimal Divide(decimal operand1, decimal operand2)
{
return operand1 / operand2;
}
}
}