1022Fermer1024
BrunniLe 07/05/2010 à 15:52
^^
Sinon que dire de ça?
abstract class Rectangular { protected int width, height; int getWidth() { return width; } int getHeight() { return height; } } class Rectangle extends Rectangular { int setWidth(int w) { width = w; } int setHeight(int h) { height = h; } } class Square extends Rectangular { int setSize(int s) { width = height = s; } }