Deck 11: Abstract Data Types and Modules
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
Play
Full screen (f)
Deck 11: Abstract Data Types and Modules
1
An integer is an example of a predefined data type.
True
2
Exported names should be qualified by the module name to avoid accidental name clashes.
True
3
Only prototypes are placed in a C header file.
False
4
The use of namespaces is explicitly tied to separate compilation.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Incomplete types are missing their actual representation.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Abstract data types are independent of the language paradigm.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Predicates and selectors are subtypes of constructors.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The C compiler enforces all of the protection rules normally associated with module or ADT mechanisms.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
An algebraic specification of an abstract data type provides a concise specification of the type and its associated operations.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Axioms that are used to specify error values are called error axioms.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Objects in an object-oriented programming and abstract data type mechanisms are essentially the same,with the same level of active control.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
The mathematical concept of a type is the conceptual model for actual types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
Mathematical models of an abstract data type can be given in terms of an algebraic specification.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Information hiding refers to the separation of data from the programmer.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Modules enhance the problem of name proliferation.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Pointers are automatically dereferenced in Ada by the dot notation.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
The arrow of the syntactic specifications of a function separates the function's domain and range.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Modifiability,reusability and security are three important design goals of abstract data types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
The Java import declaration does not correspond to the abstract notion of an import in the definition of a module.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
Encapsulation refers to the collection of all definitions related to a data type in one location
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
In C,a function declaration without a body is called a(n)____.
A) header
B) infix function
C) prototype
D) module
A) header
B) infix function
C) prototype
D) module
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Initial semantics assume that any two data values that cannot be distinguished by inspector operations must be equal.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
In Modula-2,the declarations that appear in the DEFINITION MODULE are exported and are usable by other modules.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
An operation that creates a new object of the data type being defined is called a(n)____.
A) constructor
B) initializer
C) generator
D) invoker
A) constructor
B) initializer
C) generator
D) invoker
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
____ is the separation of implementation details from definitions.
A) Encapsulation
B) Information hiding
C) Type checking
D) Obfuscation
A) Encapsulation
B) Information hiding
C) Type checking
D) Obfuscation
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
In the example of a complex number data type presented in the textbook,the properties of the complex data type can be ____ from those of the real data type by stating properties of the operations.
A) inferred
B) implied
C) derived
D) assumed
A) inferred
B) implied
C) derived
D) assumed
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
In a language-independent specification of a data type in which the signature depends on another type,we say that it ____ the other type.
A) loads
B) imports
C) borrows from
D) inherits
A) loads
B) imports
C) borrows from
D) inherits
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
ML user-defined operators are known as ____.
A) overloaded operators
B) enhanced operators
C) operator functions
D) infix functions
A) overloaded operators
B) enhanced operators
C) operator functions
D) infix functions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
The ____ of a data type includes the name of the type and the names of the operations.
A) definition
B) parameters
C) signature
D) properties
A) definition
B) parameters
C) signature
D) properties
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
An existential type of an abstract data type asserts the existence of an actual type that meets its requirements.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
A(n)____ is a program unit with a public interface and a private implementation.
A) module
B) data type
C) axiom
D) block
A) module
B) data type
C) axiom
D) block
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
The principle of extensionality states that two things are equal precisely when all their components are equal.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Data types can be ____ by creating specifications with unspecified data types.
A) parameterized
B) overloaded
C) shadowed
D) made generic
A) parameterized
B) overloaded
C) shadowed
D) made generic
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
A ____ is a combination of simple values organized in a particular manner.
A) variable
B) class
C) data type
D) data structure
A) variable
B) class
C) data type
D) data structure
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Object oriented languages solve the initialization problem by the use of constructors.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
In mathematics,the semantic properties of functions are often described by ____.
A) formulas
B) axioms
C) symbols
D) proofs
A) formulas
B) axioms
C) symbols
D) proofs
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
A(n)____ is a set of values,along with certain operations on those values.
A) expression
B) data type
C) variable
D) class
A) expression
B) data type
C) variable
D) class
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
____ are collections of services that may or may not include a data type or types.
A) Modules
B) Data types
C) Classes
D) Objects
A) Modules
B) Data types
C) Classes
D) Objects
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Predicates are inspectors that return ____ data.
A) integer
B) Boolean
C) string
D) floating point
A) integer
B) Boolean
C) string
D) floating point
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Inspectors are operations that ____.
A) retrieve previously constructed values
B) verify data correctness
C) check for security holes
D) analyze data types
A) retrieve previously constructed values
B) verify data correctness
C) check for security holes
D) analyze data types
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
The namespace-like mechanism in Java is the ____.
A) module
B) namespace
C) import
D) package
A) module
B) namespace
C) import
D) package
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Axiom ____ is the property that no axiom is implied by other axioms.
A) distinction
B) separation
C) specification
D) independence
A) distinction
B) separation
C) specification
D) independence
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
Parameterized packages are called ____ packages in Ada.
A) flexible
B) signature
C) generic
D) incomplete
A) flexible
B) signature
C) generic
D) incomplete
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
In CLU,modules are defined using the ____ mechanism.
A) package
B) cluster
C) namespace
D) import
A) package
B) cluster
C) namespace
D) import
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
A set and operations that meet the algebraic specification of an abstract data type are a(n)____ for the specification.
A) example
B) model
C) prototype
D) abstract
A) example
B) model
C) prototype
D) abstract
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
The C++ ____ mechanism is used to simulate the support of modules in C.
A) package
B) module
C) namespace
D) include
A) package
B) module
C) namespace
D) include
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
____ parameterization forces Ada to assume operations beyond basic equality and assignment.
A) Constrained
B) Specified
C) Inferred
D) Linked
A) Constrained
B) Specified
C) Inferred
D) Linked
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
In ML,a signature is essentially the type of the ____.
A) class
B) package
C) structure
D) function
A) class
B) package
C) structure
D) function
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
Using the initial algebra as the data type of the specification results in what are called the ____.
A) algebraic definitions
B) initial definitions
C) algebraic semantics
D) initial semantics
A) algebraic definitions
B) initial definitions
C) algebraic semantics
D) initial semantics
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
Ada's module mechanism is the ____.
A) package
B) module
C) namespace
D) import
A) package
B) module
C) namespace
D) import
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck