Suppose Circle and Rectangle classes are derived from GeometricObject and you declared

```
void displayGeometricObject(GeometricObject shape)
{
cout << shape.toString() << endl;
}
```
Which of the following function call is correct?
A. displayGeometricObject(Rectangle(2, 3));
B. displayGeometricObject(GeometricObject("black", true));
C. displayGeometricObject(string());
D. displayGeometricObject(Circle(5));


A. displayGeometricObject(Rectangle(2, 3));
B. displayGeometricObject(GeometricObject("black", true));
D. displayGeometricObject(Circle(5));

Computer Science & Information Technology

You might also like to view...

What is the value of x after the following function call, given the function definition below?

int x; aFunction (3, x); // function call void aFunction (int a, int &b) // function definition { b = a * 5 + 1; }

Computer Science & Information Technology

One byte has ________ bits.

a. 4 b. 8 c. 12 d. 16

Computer Science & Information Technology

If a mathematical formula refers to a cell that contains a text value rather than a number, you will get a(n) ________ error

A) #REF! B) #NULL! C) #VALUE! D) #N/A

Computer Science & Information Technology

Explain the three stepping options found in the debugging tools in modern browsers.?

What will be an ideal response?

Computer Science & Information Technology