import java.util.Stack;


public class StackTester {
	Stack st;
	Double d, d1, d2, d3;

	public static void main(String[] argv){
		StackTester stackt = new StackTester();
		stackt.add(12.0,24.0);
		}

	public StackTester() {
		st = new Stack();
		}

	void add(double d1, double d2) {
		d = new Double(d1);
		st.push(d);
		d = new Double(d2);
		st.push(d);
		
		this.d1 = (Double)st.pop();
		this.d2 = (Double)st.pop();
		this.d3 = new Double(this.d1.doubleValue() + this.d2.doubleValue());
		st.push(this.d3);
		
		d = (Double)st.pop();
		System.out.println("To athroisma einai " + d.doubleValue());
		}
	}