1. 2. 3. 4. 5. 6. 7. 8. Consider the following class definition class rectangleT
ID: 3534177 • Letter: 1
Question
1.
2.
3.
4.
5.
6.
7.
8.
Consider the following class definitionclass 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;
};
and the object declaration
rectangleType bigRect(14,10);
Which of the following statements is correct?
(Points : 4)
Explanation / Answer
1)b
2)d
3)c
4)a
5)d
6)c
7)c
8)b
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.