function Point(x, y) {
this.x = x;
this.y = y;
}
Point.prototype.moveTo = function (x, y) {
this.x = x;
this.y = y;
};
Point.prototype.toString = function () {
return "(" + this.x + ", " + this.y + ")";
};
function ColoredPoint(x, y, color) {
this.x = x;
this.y = y;
this.color = color;
}
ColoredPoint.prototype = Point.prototype;
ColoredPoint.prototype.setColor = function(color) {
this.color = color;
};
ColoredPoint.prototype.toString = function() {
return "(" + this.x + ", " + this.y + "; " + this.color + ")";
};
function Point(x, y) {
this.x = x;
this.y = y;
}
Point.prototype.moveTo = function (x, y) {
this.x = x;
this.y = y;
};
Point.prototype.toString = function () {
return "(" + this.x + ", " + this.y + ")";
};
function ColoredPoint(x, y, color) {
this.x = x;
this.y = y;
this.color = color;
}
ColoredPoint.prototype.__proto__ = Point.prototype;
ColoredPoint.prototype.setColor = function(color) {
this.color = color;
};
ColoredPoint.prototype.toString = function() {
return "(" + this.x + ", " + this.y + "; " + this.color + ")";
};