JavaScript
prototype
. Rectangle.prototype.toString = function () { return "[" + this.width + "," + this.height + "]"; } PositionedRectangle.prototype.toString = function (){ return "(" + this.x + "," + this.y +") " + Rectangle.prototype.toString.apply(this); //call superclass toString }
58 of 65