package visiteur;

import java.util.HashMap;

public class Main {
	public static void main(String[] args) {
		Expression e=new Division(new Addition(new Value(3),
				new Value(5))
		                         ,Variable.getInstance('X'));
		HashMap<Character, Double> assign=new HashMap<Character, Double>(1);
		assign.put('X', 7.0);
		EvalVisitor v= new EvalVisitor(assign);
		e.accept(v);
		System.out.println(v.getValue());
		DisplayVisitor vv=new DisplayVisitor();
		e.accept(vv);
	}
}
