class Operand{
	public StringBuffer buf;
	public CalculatorGui cg;

	public Operand(){
		buf=new StringBuffer(14);
	}
	
	public void setCalculatorGui(CalculatorGui cg){
		this.cg = cg;
		}

	public void addDigit(char ch){
		buf.append(ch);
		cg.display.setText(new String(buf));
		}

	public void deleteLastDigit(){
		buf=new StringBuffer(buf.substring(0,buf.length()-1));
		cg.display.setText(buf.toString());
		}

	public void reset(){
		buf=new StringBuffer(14);
		cg.display.setText(new String("0"));
		}

	public void set(double val){
		reset(); 
		buf.append(val);
		}

/*	public void complete(){
		Double d=new Double(buf.toString());
		Calc.st.push(d);
		reset();
	}
	*/
}		