The design of the calculator class should be in this:

this is what I have so far am really confused?:
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;
}
}

New Topic/Question
Reply



MultiQuote






|