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