Question 13 (5 points) When using an abstract data type in a C++ client, which o
ID: 3713916 • Letter: Q
Question
Question 13 (5 points)
When using an abstract data type in a C++ client, which of the following should be used?
Question 13 options:
with
use
import
include
Save
Question 14 (5 points)
When defining an Ada abstract data type, where are the specification, representation and implementation customary placed, respectively?
Question 14 options:
Public part of package specification, private part of package body, package body
All are placed in the package body
Public part of package specification, private part of package specification, package body
All are placed in the package specification
Save
Question 15 (5 points)
Which of the following is a benefit of hiding the representation of the objects of an abstract data type?
Question 15 options:
It insulates the client from representation changes
It makes the program shorter
It makes the program run faster
It insulates the client from specification changes
Save
Question 16 (5 points)
Although parameterized abstract data types could be created in Java before version 5.0, what was the drawback to such collection classes?
Question 16 options:
They ran much more slowly
Objects extracted from collections required upcasts
They required much more code
Objects extracted from collections required downcasts
Save
Question 17 (5 points)
In which language is it not possible to instantiate a parameterized type with a primitive type?
Question 17 options:
Java
C#
C++
Ada 95
Save
Question 18 (5 points)
With data abstraction, what are the mechanisms for encapsulation and information hiding?
Question 18 options:
Classes encapsulate and local variables hide information
Subprograms encapsulate and local variables hide information
Subprograms encapsulate and the private modifier hides information
Classes encapsulate and the private modifier hides information
Save
Question 19 (5 points)
When defining a C++ abstract data type, in what files are the specification and implementation placed, respectively
Question 19 options:
.obj and .h files
.cpp and .h files
.h and .cpp files
.obj and .exe files
Save
Question 20 (5 points)
How many parameters does a default constructor have?
Question 20 options:
At least one
Exactly one
It is the programmer's choice
None
with
use
import
include
Explanation / Answer
13. include 14. Public part of package specification, private part of package specification, package body 15. It insulates the client from representation changes 16. Objects extracted from collections required downcasts 17. Java 18. Classes encapsulate and the private modifier hides information 19. .h and .cpp files 20. None
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.