1D. Which of the following describes a class that would be a good candidate for
ID: 3696972 • Letter: 1
Question
1D.
Which of the following describes a class that would be a good candidate for conversion to a template class?
Select one:
a. a class which defines a new type of array
b. a class which defines rational numbers
c. a class which defines customers for a store
d. All of these
2D.
Templates are an example of algorithm abstraction.
Select one:
True
False
3D.
Select one:
a. The data type must be a pre-defined data type.
b. The data type must have a < operator defined for it.
c. The data type must be numeric.
d. The data type must be character based.
4D.
hat should you list in the pre-condition of a template function?
Select one:
a. what happens after the function is executed
b. any functionality that the instantiating class must implement (like <)
c. what must be true before the function executes
d. All of these
e. what happens after the function is executed and any functionality that the instantiating class must implement (like <)
f. any functionality that the instantiating class must implement (like <) and what must be true before the function executes
5D.
Select one:
a. Add the template prefix.
b. Change the type of the dynamic array allocation to T.
c. Add the <T> following the class name before the scope resolution operator.
d. All of these
e. None of these
Explanation / Answer
1 . All of these
2. True
3. a. The data type must be a pre-defined data type
4 any functionality that the instantiating class must implement (like <) and what must be true before the function executes
5 d All of these
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.