Question: In C++ Could use help with writing the class operator function that will compare two shapes for equality, based on their area given the class
In C++
Could use help with writing the class operator function that will compare two shapes for equality, based on their area given the class declaration below.
class shape
{ public:
shape(int h=0,int w=0);
void put(ostream &out);
float area();
bool operator == (const shape &);
private:
int height,width;
};
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
