com.ibm.websphere.samples.technologysamples.basiccalcclient.common
Class BasicCalculatorClientResultBean

java.lang.Object
  extended by com.ibm.websphere.samples.technologysamples.basiccalcclient.common.BasicCalculatorClientResultBean

public class BasicCalculatorClientResultBean
extends java.lang.Object


Field Summary
 java.lang.String operand1
          A number to perform this mathematical operation on
 java.lang.String operand2
          Another number to perform this mathematical operation on
 java.lang.String operation
          The mathematical operation to be performed
 java.lang.String result
          The value of the mathematical operation performed
 
Constructor Summary
BasicCalculatorClientResultBean()
           
 
Method Summary
 java.lang.String getOperand1()
          Returns the value of the first operand
 java.lang.String getOperand2()
          Returns the value of the second operand
 java.lang.String getOperation()
          Returns the value of the operation as a symbol +, -, *, /
 java.lang.String getResult()
          Returns the value of result (from the mathematical operation performed)
 void setOperand1(double d)
          Sets the value of operand1.
 void setOperand2(double d)
          Sets the value of operand2.
 void setOperation(java.lang.String s)
          Sets the value of operation by converting the name of the operation to its mathematical symbol.
 void setResult(double d)
          Sets the value of result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

result

public java.lang.String result
The value of the mathematical operation performed


operation

public java.lang.String operation
The mathematical operation to be performed


operand1

public java.lang.String operand1
A number to perform this mathematical operation on


operand2

public java.lang.String operand2
Another number to perform this mathematical operation on

Constructor Detail

BasicCalculatorClientResultBean

public BasicCalculatorClientResultBean()
Method Detail

setResult

public void setResult(double d)
Sets the value of result. Converts a double to a String so that it can be accessed and displayed by the JSP.

Parameters:
d - the double to be converted to a String and set as the value of result

getResult

public java.lang.String getResult()
Returns the value of result (from the mathematical operation performed)

Returns:
result the value of the mathematical operation

setOperation

public void setOperation(java.lang.String s)
Sets the value of operation by converting the name of the operation to its mathematical symbol.

Parameters:
s - the name of the operation

getOperation

public java.lang.String getOperation()
Returns the value of the operation as a symbol +, -, *, /

Returns:
operation the symbol representing the operation add, subtract, multiply, or divide

setOperand1

public void setOperand1(double d)
Sets the value of operand1. Converts a double to a String so that it can be accessed and displayed by the JSP.

Parameters:
d - the double to be converted to a String and set as the value of operand1

getOperand1

public java.lang.String getOperand1()
Returns the value of the first operand

Returns:
operand1 the value of the first operand

setOperand2

public void setOperand2(double d)
Sets the value of operand2. Converts a double to a String so that it can be accessed and displayed by the JSP.

Parameters:
d - the double to be converted to a String and set as the value of operand2

getOperand2

public java.lang.String getOperand2()
Returns the value of the second operand

Returns:
operand1 the value of the second operand