The Rectangle class header
And base class Shape header
The code compiles (Shape.cpp and Rectangle.cpp is implemented accordingly).
Which of the following commands will create an object?
Please note there could be multiple answers.
a)Shape rectangle(3.2,3.2);
b)Rectangle rectangle(3.2);
c)Rectangle rectangle(3.2,3.2);
d)Rectangle rectangle;
e)Shape shape;
f)Rectangle rectangle();

The Rectangle class headerAnd base class Shape headerThe code co.pdf

  • 1.
    The Rectangle classheader And base class Shape header The code compiles (Shape.cpp and Rectangle.cpp is implemented accordingly). Which of the following commands will create an object? Please note there could be multiple answers. a)Shape rectangle(3.2,3.2); b)Rectangle rectangle(3.2); c)Rectangle rectangle(3.2,3.2); d)Rectangle rectangle; e)Shape shape; f)Rectangle rectangle();