PLC Final Exam

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/176

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

177 Terms

1
New cards

Abstraction

A view or representation of an entity that includes only the most significant attributes.

2
New cards

Abstract Data Type (ADT)

A user-defined data type that hides the representation of its objects and defines operations within a syntactic unit.

3
New cards

Encapsulation

The bundling of data with the methods that operate on that data, restricting direct access to some of the object's components.

4
New cards

Reliability in Data Abstraction

Achieved by hiding data representations, preventing user code from depending on the representation and allowing changes without affecting user code.

5
New cards

Constructor

A function used to initialize the data members of an instance of a class.

6
New cards

Destructor

A function that cleans up after an instance is destroyed, usually to reclaim heap storage.

7
New cards

Template class (C++)

A class that allows parameterization of types, enabling the creation of generic types.

8
New cards

Generic Classes

Classes that can operate on any data type, provided in languages like Java and C# for parameterized ADTs.

9
New cards

Information Hiding

The principle of restricting access to certain details of an object, exposing only necessary components.

10
New cards

Naming Encapsulation

Creating logical groupings of names to avoid name conflicts, often implemented using namespaces or packages in programming languages.

11
New cards

In C, a function declaration without a body is called a

A) header

B) infix function

C) prototype

D) module

C: Prototype

12
New cards

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

13
New cards

____ is the separation of implementation details from definitions.

A) Encapsulation

B) Information hiding

C) Type checking

D) Obfuscation

B: Information hiding

14
New cards

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

15
New cards

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

16
New cards

ML user-defined operators are known as ____.

A) overloaded operators

B) enhanced operators

C) operator functions

D) infix functions

D: Infix functions

17
New cards

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

18
New cards

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

19
New cards

Data types can be ____ by creating specifications with unspecified data types.

A) parameterized

B) overloaded

C) shadowed

D) made generic

A: Parameterized

20
New cards

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

21
New cards

In mathematics,the semantic properties of functions are often described by ____.

A) formulas

B) axioms

C) symbols

D) proofs

B: Axioms

22
New cards

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

23
New cards

____ 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

24
New cards

Predicates are inspectors that return ____ data.

A) integer

B) Boolean

C) string

D) floating point

B: Boolean

25
New cards

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

26
New cards

The namespace-like mechanism in Java is the ____.

A) module

B) namespace

C) import

D) package

Package

27
New cards

Axiom ____ is the property that no axiom is implied by other axioms.

A) distinction

B) separation

C) specification

D) independence

Independence

28
New cards

Parameterized packages are called ____ packages in Ada.

A) flexible

B) signature

C) generic

D) incomplete

Generic

29
New cards

In CLU,modules are defined using the ____ mechanism.

A) package

B) cluster

C) namespace

D) import

Cluster

30
New cards

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

31
New cards

In Smalltalk,____ messages expect no arguments.

A) single

B) unary

C) inquisitive

D) redirecting

Unary

32
New cards

____ is the use of the same names for messages requesting similar services from different classes.

A) Polymorphism

B) Overshadowing

C) Distinction

D) Generalization

Polymorphism

33
New cards

Restricting access to internal details of software components is known as ____.

A) abstraction

B) encapsulation

C) polymorphism

D) redefinition

Encapsulation

34
New cards

n object in Smalltalk that contains code is called a ____.

A) block

B) snippet

C) routine

D) module

Block

35
New cards

When a language's variables refer to objects,we say that the language uses ____ semantics.

A) value

B) object

C) reference

D) abstract

Reference

36
New cards

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

37
New cards

In Smalltalk,messages that result in the change of state in the receiver are called ____.

A) modifiers

B) relays

C) mutators

D) adjustors

Mutators

38
New cards

In Smalltalk,an object's ____ is the set of messages it recognizes.

A) command list

B) interface

C) operator list

D) listener set

Interface

39
New cards

In Java,scalar data types are also called ____ types.

A) primitive

B) simple

C) quantitative

D) flexible

Primitive

40
New cards

____ 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

41
New cards

Applications normally create and manipulate instances of ____ classes in Smalltalk.

A) abstract

B) concrete

C) final

D) physical

Concrete

42
New cards

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

43
New cards

The Smalltalk block object is enclosed in ____.

A) [ ]

B) { }

C) ( )

D) < >

[ ]

44
New cards

A(n)____ message is sent to a class in Smalltalk.

A) object

B) class

C) control

D) constructor

class

45
New cards

____ 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

46
New cards

C++ includes ____,which specify how to deallocate memory for objects.

A) deallocators

B) garbage collectors

C) destructors

D) erasers

Destructors

47
New cards

____ can belong to more than one class.

A) Supermethods

B) Multimethods

C) Global methods

D) Variable methods

Multimethods

48
New cards

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

49
New cards

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

50
New cards

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

51
New cards

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

52
New cards

Control Structure

A control statement and the statements whose execution it controls.

53
New cards

Selection Statement

Provides the means of choosing between two or more paths of execution.

54
New cards

Nesting Selectors

The practice of placing control structures within other control structures.

55
New cards

Multiple-Way Selection Statements

Statements that allow the selection of one of any number of statements or statement groups.

56
New cards

Counter-Controlled Loops

Loops that run a specified number of times, determined by a counting variable.

57
New cards

Logically-Controlled Loops

Loops where repetition control is based on a Boolean expression.

58
New cards

Iterative Statements

Statements that allow repeated execution of a statement or compound statement.

59
New cards

Guarded Commands

Commands that support program verification by evaluating Boolean expressions.

60
New cards

Unconditional Branching

Transfers execution control to a specified place in the program.

61
New cards

Two-Way Selection Statements

Selection statements that provide two alternatives, often using an 'if-then-else' format.

62
New cards

Object-Oriented Programming (OOP)

A programming paradigm based on the concept of objects, which can contain data and code to manipulate that data.

63
New cards

Inheritance

A mechanism in OOP that allows one class to inherit the properties and behaviors (methods) of another class.

64
New cards

Polymorphism

The ability of different classes to be treated as instances of the same class through a common interface.

65
New cards

Abstract Data Types (ADTs)

Data types defined by their behavior (semantics) from the point of view of a user, rather than by their implementation.

66
New cards

Dynamic Binding

A programming mechanism that resolves method calls at runtime rather than at compile time, allowing for flexible method resolution.

67
New cards

Subclass

A derived class that inherits properties and methods from a parent class.

68
New cards

Superclass

The parent class from which properties and methods are inherited by a subclass.

69
New cards

Message Protocol

The entire collection of methods an object can respond to, composed of method names and the associated destination object.

70
New cards

Encapsulation

The bundling of data and the methods that operate on that data, restricting direct access to some of an object's components.

71
New cards

Access Control

Mechanisms that restrict access to certain entities within a class, categorized as public, private, or protected.

72
New cards

Reflection

A feature that allows a program to inspect and modify its own structure and behavior at runtime.

73
New cards

Single Inheritance

A class inheritance approach where a class can inherit from only one parent class.

74
New cards

Multiple Inheritance

A class inheritance model where a class can inherit from more than one parent class.

75
New cards

Inner Class

A class defined within the scope of another class, which can access the members of the outer class.

76
New cards

Message Sending

The process of invoking a method on an object in OOP, allowing an object to communicate with another object.

77
New cards

Instance Variable

A variable defined in a class for which each object of the class has its own copy.

78
New cards

Class Variable

A variable that is shared among all instances of a class.

79
New cards

Abstract Class

A class that cannot be instantiated on its own and is meant to be subclassed.

80
New cards

Constructor

A special method that is called when an object is instantiated, often used to initialize variables.

81
New cards

Destructor

A special method that is called when an object is destroyed, used to free resources or perform cleanup.

82
New cards

Heap-Dynamic Allocation

Memory allocation for objects at runtime that allows objects to be created and destroyed as needed.

83
New cards

Stack-Dynamic Allocation

Memory allocation for objects that are created on the stack, automatically deallocated when out of scope.

84
New cards

Method Overriding

The ability of a subclass to provide a specific implementation of a method that is already defined in its parent class.

85
New cards

Virtual Method

A method in a base class that can be overridden in derived classes and is bound at runtime.

86
New cards

Subprogram

A self-contained unit of code that performs a specific task, also known as a procedure or function.

87
New cards

Recursion

A method of solving a problem where the solution involves solving smaller instances of the same problem.

88
New cards

Base Case

The condition under which a recursive function terminates.

89
New cards

Direct Recursion

When a function calls itself.

90
New cards

Indirect Recursion

When a function calls another function that ultimately calls the original function.

91
New cards

Tail Recursive Function

A recursive function where the recursive call is the last statement executed.

92
New cards

Infinite Recursion

A situation where a recursive call never reaches a base case, causing the program to run indefinitely until memory is exhausted.

93
New cards

Parameter Passing

The method used to pass data into subprograms, can be by value, by reference, or by result.

94
New cards

Overloaded Subprograms

Subprograms that have the same name but different parameter lists.

95
New cards

Generic Subprograms

Subprograms that operate with parameters of different types, enabling code reuse for various data types.

96
New cards

Closure

A subprogram and its referencing environment, which allows it to access variables from the scope in which it was defined.

97
New cards

Dynamic Scoping

The scope of a variable is determined at runtime, depending on the order of function calls.

98
New cards

Static Scoping

The scope of a variable is determined at compile time according to the lexical structure of the program.

99
New cards

Activation Record

A data structure that stores information about a single execution of a procedure or function.

100
New cards

Pass-by-Value

A parameter passing mechanism where a copy of the actual parameter is passed to the function.