Question: How many members ( data and function ) does the following class Rectangle have? class Rectangle { public: int area ( ) ; int perimeter

How many members (data and function) does the following class Rectangle have?
class Rectangle {
public:
int area();
int perimeter();
friend void display(ostream& out, const Rectangle& rect);
private:
int width; // Data member for width
int height; // Data member for height
};

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!