Answer the following questions true (T) or false (F)

1. Templates can make available to the programmer the generality of algorithms that implementation with specific types conceals.

2. With regard to programming usage, consistency in coding is more important than optimality.

1. True
Explanation: In many functions, the algorithm that is implemented is more general than the implementation. Templates provide, in effect, an overloading of the function for every possible type that is consistent with the use in the template. For example, if you assign template parameter objects, this must make sense for the type.
2. True
Explanation: If one is inconsistent with many details in coding, the reader will make more errors than would happen otherwise.

Computer Science & Information Technology

You might also like to view...

A conditional structure that evaluates an expression and then performs one of several alternative sets of statements based on the resulting value (or condition) of the evaluated expression is known as a ____ control structure.

A. If B. Val C. Assign D. Case

Computer Science & Information Technology

___________ provides OO programs with easy extensibility and can help simplify program control structures.?

A. ?Polymorphism B. ?Inheritance C. ?Encapsulation D. ?Abstraction

Computer Science & Information Technology