Question: c++ question: //definition of class Rectangle class Rectangle { public: double area(); double perimeter(); Rectangle(); Rectangle(double x, double y); private: double length; double width; };
c++ question:
//definition of class Rectangle
class Rectangle
{
public: double area();
double perimeter();
Rectangle();
Rectangle(double x, double y);
private: double length;
double width;
};
Consider the segment of code above. Which of the following declarations is correct?__________ (2 points)
Select one:
a. Rectangle rect;
b. rect Rectangle ;
c. rect Rectangle.area();
d. class Rectangle rect;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
