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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started