Question: Draw a circle. Move a mark around on the circle (let it move a bit each time you hit the Next button). PLEASE FOLLOW THIS

Draw a circle. Move a mark around on the circle (let it move a bit each time you hit the Next button).

PLEASE FOLLOW THIS CODE. The code shoud be like this but i could not frigure it out what wrong on this.

int main()

try { if(H112 != 201401L)error("Error: incorrect std_lib_facilities_4.h version ", H112); Point top_left {100,100}; Simple_window canvas {top_left, 1000, 600, "Canvas"}; Circle : Shape { Circle(Point p, int rr); void draw_lines() const; Point center() const ; int radius() const { return r; } void set_radius(int rr) { set_point(0,Point{center().xrr,center().yrr}); // maintain r = rr; } private: int r; }; Circle c1 {Point{100,200},50}; Circle c2 {Point{150,200},100}; Circle c3 {Point{200,200},150}; Circle::Circle(Point p, int rr) // center and radius :r{rr} { add(Point{p.xr,p.yr}); // store top left corner } Point Circle::center() const { return {point(0).x+r, point(0).y+r}; } void Circle::draw_lines() const { if (color().visibility()) fl_arc(point(0).x,point(0).y,r+r,r+r,0,360); }

return 0; } catch(exception& e) { cerr << "exception: " << e.what() << ' '; return 1; } catch (...) { cerr << "Some exception "; return 2; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!