Untitled

mail@pastecode.io avatar
unknown
plain_text
25 days ago
797 B
2
Indexable
Never
#pragma once
#include "shape.h"

#include <iostream>
using namespace std;

class Point : public Shape
{
    int x;
    int y;
public:
    Point(int x, int y);
    ~Point();
    Point(const Point &pt);
    int getX(void);
    void setX(int x);

    int getY(void);
    void setY(int y);

    Point operator+(Point &rhs);
    Point operator+(int rhs);
    friend Point operator+(int lhs, Point &rhs);
    friend ostream &operator<<(ostream &os, Point &rhs);

    bool operator>(Point &rhs);
    bool operator>(int rhs);
    Point operator=(Point& rhs);
    Point operator++(void);
    Point operator++(int);

    void Move(int x, int y) override;
    void MoveX(int x) override;
    void MoveY(int y) override;
    void Rotate(int angle) override;
    void Rotate3D(int x, int y, int z) override;
};
Leave a Comment