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
______________________ //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
Get step-by-step solutions from verified subject matter experts
