Figure 2:
class rectangleType
{
public:
void setLengthWidth(double x, double y) ;
//Postcondition: length = x; width = y;
void print() const;
//Output length and width;
double area() ;
//Calculate and return the area of the rectangle;
double perimeter() ;
//Calculate and return the parameter;
rectangleType() ;
//Postcondition: length = 0; width = 0;
rectangleType(double x, double y) ;
//Postcondition: length = x; width = y;
private:
double length;
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:
Verified
Q21: A program or software that uses and
Q25: In C++, the scope resolution operator is
Q26: A class object can be _.That is,
Q27: What does ADT stand for?
A) abstract definition
Q28: By default,all members of a class are
Q28: Non-static member variables of a class are
Q30: If a class object is passed by
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents