SHARE
TWEET

Untitled

a guest May 22nd, 2019 63 in 1 day
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Figure
  2. {
  3.     float x, y;
  4.     string color;
  5.  
  6. public:
  7.     enum TYPE
  8.     {
  9.         RECT    = 0,
  10.         CIRCLE  = 1,
  11.     };
  12.  
  13.     static float point_x, point_y;
  14.  
  15.     virtual TYPE type() = 0;
  16.     virtual void print() = 0;
  17.     virtual void read(istream&) = 0;
  18.     virtual float dist_to_point() = 0;
  19. };
  20.  
  21. class Rect : public Figure
  22. {
  23.     TYPE type() override { return RECT; }
  24.     void print() override {...}
  25.     ...
  26. };
  27.  
  28. class Circle : public Figure
  29. {
  30.     ...
  31. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top