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
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 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started