import java.util.*;
public class Figuras {
	private static Map figuras = new HashMap();
	static {
		figuras.put("triangulo", new TrianguloFactory());
		figuras.put("circulo",   new CirculoFactory());
		figuras.put("retangulo", new RetanguloFactory());
	}
	public static Figura getFigura(String tipo) {
		return ((FiguraFactory) figuras.get(tipo)).getFigura();
	}
}
