Solved

Figure 2:
Class RectangleType
{
Public \quad Void SetLengthWidth(double X, Double Y);

Question 25

Multiple Choice

Figure 2:
class rectangleType
{
public:
\quad void setLengthWidth(double x, double y) ;
\quad\quad //Postcondition: length = x; width = y;
\quad void print() const;
\quad\quad //Output length and width;
\quad double area() ;
\quad\quad //Calculate and return the area of the rectangle;
\quad double perimeter() ;
\quad\quad //Calculate and return the parameter;
\quad\quad rectangleType() ;
\quad\quad //Postcondition: length = 0; width = 0;
\quad rectangleType(double x, double y) ;
\quad\quad //Postcondition: length = x; width = y;
private:
\quad double length;
\quad double width;
};
-Consider the accompanying class definition,and the declaration: rectangleType bigRect;
Which of the following statements is correct?


A) rectangleType.print() ;
B) rectangl
C) bigRect.print() ;
D) bigRect::print() ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions