Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. A derived class inherits the constructor functions of the baseclass. T F 2. A

ID: 3611506 • Letter: 1

Question

1. A derived class inherits the constructor functions of the baseclass. T F

2. A virtual function is called based on the dynamic data type ofthe calling object. T F

3.A template parameter can be used as
A.A return type
B.The data type of a parameter
C.The data type of a local variable in the function
D.All of the above are valid uses for a template variable

4.The number of children that a node in a binary tree may haveis:
A.0
B.1
C.2
D.A node in a binary tree may have between 0 to 2 children.

5.The is a relationship, such as "a circle is an ellipse" implies…
A.that the circle class can be written as a derived class of thebase class ellipse.
B.that the ellipse class can be written as a derived class of thebase class circle
C.that the class circle contains a data member that is anellipse.
D.that the class ellipse contains a data member that is acircle.

6.When overloading an operator for a class with a member functionthe left hand operand must be a member of the class.
A.True
B.False

7.Assuming that the print method is a virtual method in both therectangle and cube classes, and using the following statements thestatement r.print(cout); will use the print function in classcube.
Point p1(2,1);
Cube c1(p1,4);
Rectangle *r;
r = &c1;
r.print(cout);
A.True
B.False

Thanks for all the help!

Explanation / Answer

1. false 2.true 3.D 4.D 5.A 6.true 7.true