


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















abstract^ class
Shape^ { abstract^ class
Shape^ { abstract public^ void^ draw();abstract public^ void^ draw(); }} abstract^ public
class^ Circle
extends^ Shape
abstract^ public
class^ Circle
extends^ Shape
protected^ double
_x,^ _y,^ _r; protected^ double
_x,^ _y,^ _r; public^ Circle
(double^ x,^
double^ y,^ double
r)^ {
public^ Circle
(double^ x,^ double^ y,^ double
r)^ {
_x^ =^ x;^ _y^ = y;^ _r^ =^ r; _x^ =^ x;^ _y^ = y;^ _r^ =^ r; }} public^ void public^ void^ draw()^ {^ draw()^ { drawCircledrawCircle();(); }} abstract^ protected
void abstract^ protected
void^ drawCircle();drawCircle
public^ class V1Circle^ extends
Circle{ public^ class V1Circle^ extends
Circle{ public^ V1Circle(double
x,^ double^ y,
double^ r)^ { public^ V1Circle(double
x,^ double^ y,
double^ r)^ { super(x,y,r););super(x,y,r}} protected^ voidprotected^ void^
drawCircledrawCircle()
DP1.draw_a_circle(_x,
_y,^ _r); DP1.draw_a_circle(_x,
_y,^ _r); }} }}