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

package factorymethod;

/**
 *
 * @author Int prog
 */
public class Square extends Shape{
    public Square(double w){
        System.out.println("Area:"+area(w));
        System.out.println("perimeter:"+perimeter(w));
    }
    public  double area(double w) {
        return(w*w);
    }
    public double perimeter(double w) {
        return (4*w);
    }
}
