unit primer; interface uses graph,crt; type location=object x,y:integer; c:byte; constructor init(x1,y1:integer; c1:byte); procedure drow(c1:byte);virtual; procedure show; procedure hide; end; tochka=object(location) procedure drow(c1:byte);virtual; end; krug=object (location) r:integer; constructor init(x1,y1,r1:integer; c1:byte); procedure drow(c1:byte);virtual; end; liniya=object (location) x1,y1:integer; procedure drow(c1:byte);virtual; constructor init(x2,y2,x3,y3:integer; c1:byte); end; pryam=object (liniya) procedure drow(c1:byte);virtual; end; implementation constructor location.init(x1,y1:integer; c1:byte); begin x:=x1; y:=y1; c:=c1 end; procedure location.drow; begin end; procedure location.show; begin drow(c); end; procedure location.hide; begin drow(getbkcolor); end; procedure tochka.drow(c1:byte); begin putpixel(x,y,c1) end; constructor krug.init; begin location.init(x1,y1,c1); r:=r1; end; procedure krug.drow(c1:byte); begin setcolor(c1); circle(x,y,r) end; procedure liniya.drow(c1:byte); begin setcolor(c1); line(x,y,x1,y1) end; constructor liniya.init(x2,y2,x3,y3:integer; c1:byte); begin x1:=x3; y1:=y3; location.init(x2,y2,c1); end; procedure pryam.drow(c1:byte); begin setcolor(c1); rectangle(x,y,x1,y1); end; end.