package geoshapes
{
	public class GeometricShapeFactory 
	{
	    public static function createShape(shapeName:String, len:Number):IGeometricShape
	    {
	        switch (shapeName)
	        {       
                case "三角形":
                    return new EquilateralTriangle(len);
                    
                case "正方形":
                    return new Square(len);
                    
	            case "圆形":
	                return new Circle(len);
            }
            return null;
	    }
	}
}