Exam4Training

Which UML concept should these designers use?

The implementation of the collection functions cannot be overridden.

Which UML concept should these designers use?
A . Classes
B . Interfaces
C . Power Types
D . Class Templates

Answer: D

Explanation:

In UML, class templates are the concept used to create classes that can be parameterized with different data types. This feature satisfies the first condition, allowing collections to support any data type. Class templates can be specialized, fulfilling the second condition, where some collections can inherit from others, thus enabling the reuse of functionality. Additionally, UML allows for operations to be defined in such a way that they cannot be overridden, by specifying them as non-virtual or final, which meets the third condition. Therefore, the use of class templates would be the most suitable approach for the design criteria specified by the programming language designers. This approach is consistent with the capabilities of class templates as described in the UML 2.x Superstructure Specification.

Exit mobile version