Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

1. Which position would you take?

Answered: 1 week ago