import java.util.Stack;

class Calc {
	static Operand op;
	static Stack st;
	
	public static void main(String [] argv){
		op = new Operand();
		st = new Stack();
		CalculatorGui cg = new CalculatorGui(op);
		}
	}
	

class Operand{
	public StringBuffer buf;

	public Operand(){ 
		buf = new StringBuffer(14); 
		}

	public void addDigit(char ch){
		buf.append(ch);
		System.out.println("adddigit");
		}  

	public void deleteLastDigit(){
		String s =new String(buf);
		buf = new 
StringBuffer(s.substring(0,s.length()-1));
		}
	
	public void reset(){
		buf = new StringBuffer(14);
		System.out.println("reset");
		}	 

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

	public void complete(){      
		Double d = new Double(buf.toString());
		Calc.st.push(d);
		reset();
		System.out.println("complete");
		}
	}
