1/176
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Abstraction
A view or representation of an entity that includes only the most significant attributes.
Abstract Data Type (ADT)
A user-defined data type that hides the representation of its objects and defines operations within a syntactic unit.
Encapsulation
The bundling of data with the methods that operate on that data, restricting direct access to some of the object's components.
Reliability in Data Abstraction
Achieved by hiding data representations, preventing user code from depending on the representation and allowing changes without affecting user code.
Constructor
A function used to initialize the data members of an instance of a class.
Destructor
A function that cleans up after an instance is destroyed, usually to reclaim heap storage.
Template class (C++)
A class that allows parameterization of types, enabling the creation of generic types.
Generic Classes
Classes that can operate on any data type, provided in languages like Java and C# for parameterized ADTs.
Information Hiding
The principle of restricting access to certain details of an object, exposing only necessary components.
Naming Encapsulation
Creating logical groupings of names to avoid name conflicts, often implemented using namespaces or packages in programming languages.
In C, a function declaration without a body is called a
A) header
B) infix function
C) prototype
D) module
C: Prototype
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
____ is the separation of implementation details from definitions.
A) Encapsulation
B) Information hiding
C) Type checking
D) Obfuscation
B: Information hiding
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
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
B: imports
ML user-defined operators are known as ____.
A) overloaded operators
B) enhanced operators
C) operator functions
D) infix functions
D: Infix functions
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
C: Signature
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
Data types can be ____ by creating specifications with unspecified data types.
A) parameterized
B) overloaded
C) shadowed
D) made generic
A: Parameterized
A ____ is a combination of simple values organized in a particular manner.
A) variable
B) class
C) data type
D) data structure
D: Data Structure
In mathematics,the semantic properties of functions are often described by ____.
A) formulas
B) axioms
C) symbols
D) proofs
B: Axioms
A(n)____ is a set of values,along with certain operations on those values.
A) expression
B) data type
C) variable
D) class
B: Data Type
____ 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
Predicates are inspectors that return ____ data.
A) integer
B) Boolean
C) string
D) floating point
B: Boolean
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 data
The namespace-like mechanism in Java is the ____.
A) module
B) namespace
C) import
D) package
Package
Axiom ____ is the property that no axiom is implied by other axioms.
A) distinction
B) separation
C) specification
D) independence
Independence
Parameterized packages are called ____ packages in Ada.
A) flexible
B) signature
C) generic
D) incomplete
Generic
In CLU,modules are defined using the ____ mechanism.
A) package
B) cluster
C) namespace
D) import
Cluster
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
Model
In Smalltalk,____ messages expect no arguments.
A) single
B) unary
C) inquisitive
D) redirecting
Unary
____ is the use of the same names for messages requesting similar services from different classes.
A) Polymorphism
B) Overshadowing
C) Distinction
D) Generalization
Polymorphism
Restricting access to internal details of software components is known as ____.
A) abstraction
B) encapsulation
C) polymorphism
D) redefinition
Encapsulation
n object in Smalltalk that contains code is called a ____.
A) block
B) snippet
C) routine
D) module
Block
When a language's variables refer to objects,we say that the language uses ____ semantics.
A) value
B) object
C) reference
D) abstract
Reference
In Smalltalk,the object that receives a message performs its service by invoking an appropriate ____.
A) method
B) function
C) procedure
D) sub-routine
Method
In Smalltalk,messages that result in the change of state in the receiver are called ____.
A) modifiers
B) relays
C) mutators
D) adjustors
Mutators
In Smalltalk,an object's ____ is the set of messages it recognizes.
A) command list
B) interface
C) operator list
D) listener set
Interface
In Java,scalar data types are also called ____ types.
A) primitive
B) simple
C) quantitative
D) flexible
Primitive
____ is an important need satisfied by object-oriented programming.
A) Rapid prototyping
B) Program component dependence
C) Abstract data typing
D) Independence of software components
Independence of software components
Applications normally create and manipulate instances of ____ classes in Smalltalk.
A) abstract
B) concrete
C) final
D) physical
Concrete
The first programming language to incorporate the object paradigm in a thorough and consistent way was ____.
A) Simula67
B) Smalltalk-80
C) Fortran-80
D) Algol60
Simula67
The Smalltalk block object is enclosed in ____.
A) [ ]
B) { }
C) ( )
D) < >
[ ]
A(n)____ message is sent to a class in Smalltalk.
A) object
B) class
C) control
D) constructor
class
____ binding is the binding of messages to methods based on the class of the receiver object.
A) Automatic
B) Static
C) Adaptive
D) Dynamic
Dynamic
C++ includes ____,which specify how to deallocate memory for objects.
A) deallocators
B) garbage collectors
C) destructors
D) erasers
Destructors
____ can belong to more than one class.
A) Supermethods
B) Multimethods
C) Global methods
D) Variable methods
Multimethods
A function is considered to be ____ if a compiler may replace the function call by the actual code for the function.
A) inline
B) substitutable
C) redirectable
D) virtual
Inline
Member functions can be implemented outside the declaration of a class in C++ using the ____ operator.
A) scope altering
B) redirection
C) directive
D) scope resolution
Scope Resolution
In C++,a pure virtual declaration is a function declared with the keyword virtual and ____.
A) the keyword null
B) a pointer
C) parentheses
D) the keyword void
Parenthesis
Abstract Data Type
a user-defined data type that satisfies the following conditions
- The representation of objects of the type is hidden from the program units that use these objects
- The declarations of the type and the protocols of the operations on objects of the type are contained in a single syntactic unit
Control Structure
A control statement and the statements whose execution it controls.
Selection Statement
Provides the means of choosing between two or more paths of execution.
Nesting Selectors
The practice of placing control structures within other control structures.
Multiple-Way Selection Statements
Statements that allow the selection of one of any number of statements or statement groups.
Counter-Controlled Loops
Loops that run a specified number of times, determined by a counting variable.
Logically-Controlled Loops
Loops where repetition control is based on a Boolean expression.
Iterative Statements
Statements that allow repeated execution of a statement or compound statement.
Guarded Commands
Commands that support program verification by evaluating Boolean expressions.
Unconditional Branching
Transfers execution control to a specified place in the program.
Two-Way Selection Statements
Selection statements that provide two alternatives, often using an 'if-then-else' format.
Object-Oriented Programming (OOP)
A programming paradigm based on the concept of objects, which can contain data and code to manipulate that data.
Inheritance
A mechanism in OOP that allows one class to inherit the properties and behaviors (methods) of another class.
Polymorphism
The ability of different classes to be treated as instances of the same class through a common interface.
Abstract Data Types (ADTs)
Data types defined by their behavior (semantics) from the point of view of a user, rather than by their implementation.
Dynamic Binding
A programming mechanism that resolves method calls at runtime rather than at compile time, allowing for flexible method resolution.
Subclass
A derived class that inherits properties and methods from a parent class.
Superclass
The parent class from which properties and methods are inherited by a subclass.
Message Protocol
The entire collection of methods an object can respond to, composed of method names and the associated destination object.
Encapsulation
The bundling of data and the methods that operate on that data, restricting direct access to some of an object's components.
Access Control
Mechanisms that restrict access to certain entities within a class, categorized as public, private, or protected.
Reflection
A feature that allows a program to inspect and modify its own structure and behavior at runtime.
Single Inheritance
A class inheritance approach where a class can inherit from only one parent class.
Multiple Inheritance
A class inheritance model where a class can inherit from more than one parent class.
Inner Class
A class defined within the scope of another class, which can access the members of the outer class.
Message Sending
The process of invoking a method on an object in OOP, allowing an object to communicate with another object.
Instance Variable
A variable defined in a class for which each object of the class has its own copy.
Class Variable
A variable that is shared among all instances of a class.
Abstract Class
A class that cannot be instantiated on its own and is meant to be subclassed.
Constructor
A special method that is called when an object is instantiated, often used to initialize variables.
Destructor
A special method that is called when an object is destroyed, used to free resources or perform cleanup.
Heap-Dynamic Allocation
Memory allocation for objects at runtime that allows objects to be created and destroyed as needed.
Stack-Dynamic Allocation
Memory allocation for objects that are created on the stack, automatically deallocated when out of scope.
Method Overriding
The ability of a subclass to provide a specific implementation of a method that is already defined in its parent class.
Virtual Method
A method in a base class that can be overridden in derived classes and is bound at runtime.
Subprogram
A self-contained unit of code that performs a specific task, also known as a procedure or function.
Recursion
A method of solving a problem where the solution involves solving smaller instances of the same problem.
Base Case
The condition under which a recursive function terminates.
Direct Recursion
When a function calls itself.
Indirect Recursion
When a function calls another function that ultimately calls the original function.
Tail Recursive Function
A recursive function where the recursive call is the last statement executed.
Infinite Recursion
A situation where a recursive call never reaches a base case, causing the program to run indefinitely until memory is exhausted.
Parameter Passing
The method used to pass data into subprograms, can be by value, by reference, or by result.
Overloaded Subprograms
Subprograms that have the same name but different parameter lists.
Generic Subprograms
Subprograms that operate with parameters of different types, enabling code reuse for various data types.
Closure
A subprogram and its referencing environment, which allows it to access variables from the scope in which it was defined.
Dynamic Scoping
The scope of a variable is determined at runtime, depending on the order of function calls.
Static Scoping
The scope of a variable is determined at compile time according to the lexical structure of the program.
Activation Record
A data structure that stores information about a single execution of a procedure or function.
Pass-by-Value
A parameter passing mechanism where a copy of the actual parameter is passed to the function.