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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!