/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package factorymethod;

/**
 *
 * @author Int prog
 */
public class ShapeFactory {

    public static Shape getInfo(String shape,double r) {
        if (shape.equalsIgnoreCase("circle")){
            return new Circle(r);
        }
        else if(shape.equalsIgnoreCase("square")){
            return new Square(r);
        }
        else{
            return null;
        }
    }

}
