class NewRectangle extends AbstractShape { double w, h; NewRectangle(double width, double height){ w = width; h = height; } double area(){ return w*h; } void printDetails(){ System.out.println("Rectangle: at ("+x+", "+y+")"+"area = "+area()); } }