Advertisement
Shaco74

MyRectangle.h

Jan 4th, 2022
859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. class MyRectangle {
  2. public:
  3.     MyRectangle(int px1 = 0, int py1 = 0, int px2 = 20, int py2 = 20);
  4.     void set(int px1, int py1, int px2, int py2);
  5.     void setx1(int pWert);
  6.     void setx2(int pWert);
  7.     void sety1(int pWert);
  8.     void sety2(int pWert);
  9.     int get_x1();
  10.     int get_x2();
  11.     int get_y1();
  12.     int get_y2();
  13.     void draw() const;
  14.     void draw_red() const;
  15.     bool does_not_collide_with(const MyRectangle& other) const;
  16.     MyRectangle operator * (double d);
  17. protected:
  18.     int x1, y1, x2, y2;
  19. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement