Order Number |
8456125475 |
Type of Project |
ESSAY |
Writer Level |
PHD VERIFIED |
Format |
APA |
Academic Sources |
10 |
Page Count |
3-12 PAGES |
\Which of the following features must a language contain to support the development of abstract data types?
Question 1 options: Concurrency Lambda expressions Information hiding Inheritance Save Question 2 (5 points) Which of the following is not an encapsulation mechanism?
Question 2 options: A Java package A C++ namespace A Java instance variable An Ada package Save Question 3 (5 points) Information hiding is intended to hide which of the following features of a data type?
Question 3 options: Return types of method signatures the representation of the data type the name of the data type Method signatures defining a data type’s operation Save Question 4 (5 points) In most object-based languages, the reserved word private is provided to support which of the following?
Question 4 options: Encapsulation Inheritance Information hiding Polymorphism Save Question 5 (5 points) Which of the following language features does not provide support for parameterized abstract data types?
Question 5 options: Java generic classes C++ templates C function pointer parameters Ada generic packages Save Question 6 (5 points) In Java, which of the following access modifiers provides greatest access to an instance variable?
Question 6 options: public No modifier protected private Save Question 7 (5 points) With process abstraction, what are the mechanisms for encapsulation and information hiding?
Question 7 options: Classes encapsulate and the private modifier hides information Subprograms encapsulate and the private modifier hides information Classes encapsulate and local variables hide information Subprograms encapsulate and local variables hide information Save
Question 8 (5 points) When is it critical to provide a destructor with a C++ abstract data type? Question 8 options: When any data member is static variable When any data member is a variable allocated on the stack When any data member is a variable allocated on the heap pointed to by an explicit pointer When any data member is a constant allocated on the stack Save
Question 9 (5 points) In most languages that provide constructors or destructors, how are they named? Question 9 options: The programmer is free to choose the names All constructors and destructors have predefined names the constructor is named constructor and the destructor is named destructor the names are based on the class name Save
Question 10 (5 points) Which of the following orderings of the encapsulation units of Java is ordered smallest to largest? Question 10 options: Method, class, package Class, package, method Package, class, method, package, class Save
Question 11 (5 points) Which of the following encapsulation units is typically used to define only a single type?
Question 11 options: C++ namespaces Java packages Ada packages Java class Save
Question 12 (5 points) In which of the following languages is it customary to separate the specification from the implementation when defining an abstract data type? Question 12 options: Only C++ Java C++ and Ada C++ and Java Save
Question 13 (5 points) When using an abstract data type in a C++ client, which of the following should be used?
Question 13 options: use import include with 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: All are placed in the package specification Public part of package specification, private part of package specification, package body Public part of package specification, private part of package body, package body All are placed in the package body 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 makes the program run faster It insulates the client from specification changes It insulates the client from representation changes It makes the program shorter 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: Objects extracted from collections required up casts
They required much more code They ran much more slowly Objects extracted from collections required downcast Save
Question 17 (5 points) In which language is it not possible to instantiate a parameterized type with a primitive type?
Question 17 options: C++ Java C# Ada 95 Save Question 18 (5 points) With data abstraction, what are the mechanisms for encapsulation and information hiding?
Question 18 options: Subprograms encapsulate and the private modifier hides information Classes encapsulate and local variables hide information Subprograms encapsulate and local variables hide 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 .obj and .exe files .h and .cop files .cop and .h files Save Question 20 (5 points) How many parameters does a default constructor have? Question 20 options: None It is the programmer’s choice Exactly one At least one