/* * File: Square.java * * Square class * * Copyright: Northeast Parallel Architectures Center * */ // A square is a rectangle with equal sides: public class Square extends Rectangle { // Square constructor #1: public Square( int x, int y, int size ) { // invoke a constructor of the superclass: super( x, y, size, size ); } // Square constructor #2: public Square( int x, int y, int size, double theta ) { // invoke a constructor of the superclass: super( x, y, size, size, theta ); } // Square constructor #3: // public Square( int x, int y, int r ); // a conflict! }