Question: p3 1)The notation vector means that the vector a)is a template class b)has object elements c)has primitive elements d)is a primitive data type 2)Using a
p3
1)The notation vector
a)is a template class
b)has object elements
c)has primitive elements
d)is a primitive data type
2)Using a data member of type Engine in Car class is an example of
a)inheritance
b)encapsulation
c)composition
d)IS-A relationship
22)Array elements
a)may be a mix of primitive and object types
b)may be of a struct or a class type
c)may only be of a primitive type
d)may not be of a struct type
3)In the derived class definition, you list from the base class
a)all the member functions
b)all the data members and member functions
c)only the member functions that are overriden
d)only the public member functions
4)Which of the following describes a class that would be a good candidate for conversion to a template class?
a)A class which defines rational numbers
b)All of the choices
c)A class which defines customers for a store
d)A class which defines a new type of array
5)If you do not overload any operators for a class you create
a)operator = exists and has the default behavior
b)operator + exists and has the default behavior
c)operator ++ exists and has the default behavior
d)operator < exists and has the default behavior
6)To assign values to a structure variable, you use the
a)the :: operator
b)the = operator
c)the -> operator
d)the <- operator
7)A derived class pointer can point to
a)a derived class object or objects of its derived classes
b)a derived class object only
c)a base class object only
d)a base or a derived class object
8)A member function of a class should be made private
a)always
b)only if it will never be used
c)if will only be used by derived classes
d)if it will only be used by other members of the class
9)A member function that allows the user to change the value in a data member is known as
a)a manipulator function
b)a getter
c)a data accessor function
d)a mutator function
10)Polymorphism is implemented in C++ using a mechanism known as
a)composition
b)IS-A relationship
c)late binding
d)inheritance
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
