Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. struct Point {
  2. double x, y;
  3. };
  4.  
  5. // Define your class below this line
  6. class Rectangle
  7. {
  8. public:
  9. Rectangle(double p.x, double p.y, double w, double h);
  10. double getArea() const;
  11. double getWidth() const;
  12. double getHeight() const;
  13. double getX() const;
  14. double getY() const;
  15.  
  16. void setLocation(double x, double y);
  17. void setHeight(double w, double h);
  18. private:
  19. Point p;
  20. double width;
  21. double height;
  22.  
  23. };
  24.  
  25. Rectangle::Rectangle(double p.x, double p.y, double w, double h)
  26. :(p.x),(p.y), width(w), height(h)
  27. {
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement