Given the following statements : (1) To implement Abstract data type, a programming language require a syntactic unit to encapsulate type definition.
Given the following statements :
(1) To implement Abstract data type, a programming language require a syntactic unit to encapsulate type definition.
(2) To implement ADT, a programming language requires some primitive operations that are built in the language processor.
(3) C++, Ada, Java 5.0, C#2005 provide support for parameterized ADT Which one of the following options is correct?
Show answerHide answer
Correct answer: (D) (1), (2) and (3) are true
Explanation
Language requirements for ADTs: a syntactic unit in which to encapsulate the type definition, and some primitive operations built into the language processor. Ada provides packages that simulate ADTs, C++ provides data abstraction through classes, and Java's data abstraction is similar to C++. C++, Ada, Java 5.0 and C# 2005 support parameterized ADTs. So (1), (2) and (3) are true. Hence, the answer is (d).