Question: Consider the following class definition class rectangleType { public: //Postcondition: length = x; width = y; void setLengthWidth(double x, double y); //Output length and width;

Consider the following class definition

class rectangleType { public: //Postcondition: length = x; width = y; void setLengthWidth(double x, double y); //Output length and width; void print() const; //Calculate and return the area of the rectangle; double area(); //Calculate and return the parameter; double perimeter(); //Postcondition: length = 0; width = 0; rectangleType(); //Postcondition: length = x; width = y; rectangleType(double x, double y); private: double length; double width; }; // and the object declaration

rectangleType bigRect(14,10);

Which of the following statements is correct?

bigRect.setLengthWidth(); bigRect.setLengthWidth(3.0, 2.0); bigRect.length = 2.0; bigRect.length = bigRect.width;

A(n) _____ relationship represents composition.

"has a" "is a" "part of" logical

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!