Question: #include using namespace std; class Rectangle { private: int x, y; public: Rectangle() { x=0; y=0; } Rectangle(int, int); int getx(); int area(void) { return

#include using namespace std; class Rectangle { private: int x, y; public: Rectangle() { x=0; y=0; } Rectangle(int, int); int getx(); int area(void) { return (x, *y); } };

______________________ //line 20 { return x; }

______________________ //line 25 { x=a; y=b; }

int main() { Rectangle myRect; myRect =Rectangle(20, 30); cout << "get x" << myRect.getx() << endl; cout << "my area" << myRect.area() << endl; //system("pause") return 0; }

1. Fill in the blank in line 20

2. Fill in the blank in line 25

3. How many member does Rectangle have?

4. How many constructors does class Rectangle have?

5. Which constructor(s) is used to initialize object Rectangle?

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 Databases Questions!