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. Which of the following variable declarations is correct?

A. rectangle rectangleType;
B. class rectangleType rectangle;
C. rectangleType rectangle;
D. rectangle rectangleType.area;


Answer: C

Computer Science & Information Technology

You might also like to view...

Which statement below could be used to simulate the outputs of tossing a quarter to get heads or tails? Suppose randomNumbers is a SecureRandom object.

a. randomNumbers.nextInt(7); b. randomNumbers.nextInt(2); c. randomNumbers.nextInt(1); d. randomNumbers.nextInt(25);

Computer Science & Information Technology

Which configuration has a central wireless device that is used to serve all wireless clients?

A. The Basic Service Set (BSS) B. A point-of-sale (POS) terminal C. A data frame D. The OSI (Open Systems Interconnection) model

Computer Science & Information Technology

The ____ standard addresses the two weaknesses of wireless networks: encryption and authentication.

A. 802.3 B. 802.11i C. AES D. RC4

Computer Science & Information Technology

What is the precondition of the following algorithm?Algorithm fillQueues (q0to9, q10to19, q20to29, qOver29)This algorithm reads data from the keyboard and places them in one of four queues).Post queues filled with data1 loop (not end of data)   1 read (number)   2 if (number < 10)      1 enqueue (q0to9, number)   3 elseif (number < 20)      1 enqueue (q10to19, number)   4 elseif (number < 30)      1 enqueue (q20to29, number)   5 else      1 enqueue (qOver29, number)   6 end if2 end loopend fillQueues

A. all four queues have been created B. none of the queues have been created C. none of the queues is empty D. q0to9 is empty

Computer Science & Information Technology