how to write test case for following simpleCalculator program in android ?can you explain?
<p>package com.example.SimpleCalculator;</p>

<p>import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;</p>

<p>public class Calculator extends Activity {
    Button b1,b2,b3,b4,b5,b6,b7,b8,b9,b0,mul_button,div_button,add_button,min_button,dot_button,equal_button,clear_button;
    EditText myText;
    int operand1=0,result;
    int operand2=0;
    char operator;
    String Stroperand1,Stroperand2,Strresult ;
    /<em>private static final String TAG = "MyActivity";</em>/</p>

<pre><code>/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

   myText=(EditText)findViewById(R.id.editText1);
   b0=(Button)findViewById(R.id.zero_button);
    b1=(Button)findViewById(R.id.digit1_button);
    b2=(Button)findViewById(R.id.digit2_button);
    b3=(Button)findViewById(R.id.digit3_button);
    b4=(Button)findViewById(R.id.digit4_button);
    b5=(Button)findViewById(R.id.digit5_button);
    b6=(Button)findViewById(R.id.digit6_button);
    b7=(Button)findViewById(R.id.digit7_button);
    b8=(Button)findViewById(R.id.digit8_button);
    b9=(Button)findViewById(R.id.digit9_button);
    add_button=(Button)findViewById(R.id.plus_button);
    min_button=(Button)findViewById(R.id.minus_button);
    div_button=(Button)findViewById(R.id.divide_button);
    mul_button=(Button)findViewById(R.id.mul_button);
    equal_button=(Button)findViewById(R.id.equal_button);
    clear_button=(Button)findViewById(R.id.clear_button);
    dot_button=(Button)findViewById(R.id.dot_button);


   b0.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                if(operand2==0)
                 operand2=0;
                else
                {
                  operand2*=10;             
                 }
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                if(operand1==0)
                    operand1=0;
                else
                {
                    operand1*=10;
                }
                 Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }               
        }
        });

    b1.setOnClickListener(new OnClickListener(){

        public void onClick(View v){            
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+1;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+1;
                 Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }
        }
        });

    b2.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+2;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+2;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }
        }
        });
   b3.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+3;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+3;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }           
        }
        });
    b4.setOnClickListener(new OnClickListener(){
        public void onClick(View v){

            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+4;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+4;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }               
        }
        });
    b5.setOnClickListener(new OnClickListener(){
        public void onClick(View v){

            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+5;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+5;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }           
        }
        });
    b6.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+6;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+6;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }  
          }
        });
    b7.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+7;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+7;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }               
        }
        });
    b8.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+8;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+8;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }                           
        }
        });
    b9.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            if(operator=='+'||operator=='-'||operator=='*'||operator=='/')
            {
                operand2=operand2*10+9;
                Stroperand2 = Integer.toString(operand2);
                myText.setText(Stroperand2);
            }
            else{
                operand1=operand1*10+9;
                Stroperand1 = Integer.toString(operand1);
                myText.setText(Stroperand1);
                }           
        }
        });
   /*dot_button.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            myText.setText(dot_button.getText());               
        }
         });*/
      add_button.setOnClickListener(new OnClickListener(){
         public void onClick(View v){
             operator='+';

        }
         });
    min_button.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            operator='-';

        }
         });
    mul_button.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            operator='*';               
        }
         });
    div_button.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            operator='/';

        }
         });     
    equal_button.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
             if(operator=='+')
             {
                 result=operand1+operand2;
                 Strresult = Integer.toString(result);
                 myText.setText(Strresult);
             }
             else if(operator=='-')
             {
                 result=operand1-operand2;
                 Strresult = Integer.toString(result);
                 myText.setText(Strresult);
             }

             else if(operator=='*')
             {
                 result=operand1*operand2;
                 Strresult = Integer.toString(result);
                 myText.setText(Strresult);
             } 
             else if(operator=='/')
             {
                     result=operand1/operand2;
                     Strresult = Integer.toString(result);
                     myText.setText(Strresult);
             }
             else
             {
             }
        }
         });
    clear_button.setOnClickListener(new OnClickListener(){
        public void onClick(View v){
            clear();

        }
         });
}
    private void clear(){
        operand1=0;
        operand2=0;
        operator=' ';
        myText.setText("");
       }
</code></pre>

<p>}</p>
