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

1. (TCO 4) If the derived class classD overrides a public member function functi

ID: 3661145 • Letter: 1

Question

1.(TCO 4) If the derived class classD overrides a public member function functionName of the base class classB, then to specify a call to that public member function of the base class, you use the ____ statement.(Points : 4) classD::functionName();
classB::functionName();
classD.functionName();
classB.functionName();

2.(TCO 6) Which of the following operators may not be overloaded?(Points : 4) =
::
||
&&

3.(TCO 6) Which of the following function prototypes overloads the != operator for the class rectangleType?(Points : 4) bool operator!=(rectangle&) const;
bool operator!=(const rectangleType&) const;
int operator!=(const rectangleType) const;
int operator!=(rectangle&) const;

4.(TCO 6) An example of a unary operator is(Points : 4) -
+
*
/

5.(TCO 6) Which of the following statements is true for the C++ language?(Points : 4) The precedence of an operator can be changed.
Every instance of an overloaded operator has the same number of parameters.
It is not necessary to overload relational operators for classes that have only int member variables.
The post-increment (++) and the pre-increment (++) operators prototype must be the same as they use the same symbols (++).

6.(TCO 6) Including the const keyword before the parameter of an overloaded operator will(Points : 4) cause a compiler error.
prevent the operator from changing the value of the parameter.
prevent the operator from changing the value of the parameter only if it is an object of the same class in which the overloaded operator is defined.
only be used when overloading the assignment operator.

7.(TCO 7) Which term designates the ability to use the same expression to denote different operations?(Points : 4) Inheritance
Encapsulation
Polymorphism
Composition.

8.(TCO 7) Any child class function with the same name and argument list as the parent class does what to the parent function?(Points : 4) Overloads
Specializes
Generalizes
Overrides

9.(TCO 7) If a class has a pure virtual function then(Points : 4) that class is an abstract class.
it is a derived class with multiple base classes.
any class derived from it cannot redefine or override that function.
it automatically has a virtual destructor.

10.(TCO 7) If a class is abstract then(Points : 4) no objects may be instantiated of that class.
any and all objects of that class must be declared as virtual also.
its destructor must also be virtual.
it provides a blueprint for objects instantiated from it.

11.(TCO 7) The implementation of a virtual function declared in a class(Points : 4) is provided in the classes derived from the class.
is provided in the C++ implementation file associated with the class definition.
Avirtual function is never implemented in any class.
must be done in the base class from which the virtual function is derived.

12.(TCO 8) Which is the general syntax of the namespace definition statement?(Points : 4) namespace namespace_name { members }
using namespace namespace_name
using namespace namespace_name;
namespace std { members }

13.(TCO 8) Which one of the commonly used include (header) files is not covered by the std namespace?(Points : 4) math
iomanip
string
iostream

14.(TCO 8) When creating a macro, which preprocessor directive is used?(Points : 4) ifndef
define
ifdef
endif 1.(TCO 4) If the derived class classD overrides a public member function functionName of the base class classB, then to specify a call to that public member function of the base class, you use the ____ statement.(Points : 4) classD::functionName();
classB::functionName();
classD.functionName();
classB.functionName();

Explanation / Answer

d c b b c d b c a d a b a c