Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Point {
- double x, y;
- };
- // Define your class below this line
- class Rectangle
- {
- public:
- Rectangle(double p.x, double p.y, double w, double h);
- double getArea() const;
- double getWidth() const;
- double getHeight() const;
- double getX() const;
- double getY() const;
- void setLocation(double x, double y);
- void setHeight(double w, double h);
- private:
- Point p;
- double width;
- double height;
- };
- Rectangle::Rectangle(double p.x, double p.y, double w, double h)
- :(p.x),(p.y), width(w), height(h)
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement