Deck 9: Advanced Modularization Techniques
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
Match between columns
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/51
Play
Full screen (f)
Deck 9: Advanced Modularization Techniques
1
When methods must share data, you can pass the data into and return the data out of methods.
True
2
Variables and constants are ____ within, or local to, only the method in which they are declared.
A) in scope
B) out of bounds
C) out of scope
D) limited
A) in scope
B) out of bounds
C) out of scope
D) limited
A
3
Programs that use recursion are error-prone but easy to debug.
False
4
A method's name and parameter list constitute the method's ____.
A) header
B) interface
C) contract
D) signature
A) header
B) interface
C) contract
D) signature
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
5
You can invoke or call a method from another program or method.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
6
You can think of the ____ in a method declaration as a funnel into the method.
A) braces
B) brackets
C) parentheses
D) commas
A) braces
B) brackets
C) parentheses
D) commas
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
7
The input value that makes the recursion stop is called the base case or ending case.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
8
The variables in the method declaration that accept the values from the actual parameters are ____ parameters.
A) defined
B) proper
C) formal
D) actual
A) defined
B) proper
C) formal
D) actual
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
9
A method's declared return type must match the type of value used in the return statement.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
10
A calling method sends a(n) ____ to a called method.
A) parameter
B) interface
C) object
D) argument
A) parameter
B) interface
C) object
D) argument
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
11
A called method accepts the value of an argument passed to it as its ____.
A) parameter
B) reference
C) baseline
D) argument
A) parameter
B) reference
C) baseline
D) argument
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
12
When a copy of a variable is sent to a method, it is passed by ____.
A) reference
B) inference
C) insinuation
D) value
A) reference
B) inference
C) insinuation
D) value
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
13
When a data item is known to all of a program's modules, it is a ____data item.
A) scope
B) defined
C) local
D) global
A) scope
B) defined
C) local
D) global
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
14
Each time a method executes, any parameter variables listed in the method header are ____.
A) examined
B) redeclared
C) referenced
D) copied
A) examined
B) redeclared
C) referenced
D) copied
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
15
The last statement in a method is a(n) ____.
A) begin statement
B) return statement
C) exit statement
D) end statement
A) begin statement
B) return statement
C) exit statement
D) end statement
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
16
A method's return type is part of its signature.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
17
A method could be called using any numeric value as an argument, whether it is a variable, a named constant, or a literal constant.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
18
In implementation hiding, the calling method needs to understand only the interface to the method that is called and it need not know how the method works internally.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
19
All modern programming languages contain many methods that are predefined.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
20
Methods with identical names that have identical parameter lists but different return types are ambiguous.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
21
Every time you call a method, the address to which the program should return at the completion of the method is stored in a memory location called the ____.
A) heap
B) queue
C) stack
D) dump
A) heap
B) queue
C) stack
D) dump
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
22
When you ____ a method, you write multiple methods with a shared name but different parameter lists.
A) stack
B) overload
C) overhead
D) void
A) stack
B) overload
C) overhead
D) void
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
23
____ is a measure of the strength of the connection between two program methods.
A) Coupling
B) Cohesion
C) Bonding
D) Binding
A) Coupling
B) Cohesion
C) Bonding
D) Binding
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
24
Programmers refer to hidden implementation details as existing in a(n) ____________________.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
25
____ occurs when a method is defined in terms of itself.
A) Referential integrity
B) Repeatability
C) Dependence
D) Recursion
A) Referential integrity
B) Repeatability
C) Dependence
D) Recursion
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
26
Using recursion successfully requires a thorough understanding of ____________________.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
27
____ refers to how the internal statements of a method serve to accomplish the method's purpose.
A) Coupling
B) Cohesion
C) Bonding
D) Binding
A) Coupling
B) Cohesion
C) Bonding
D) Binding
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
28
Using implementation hiding means that the ____ is the only part of a method with which the method's client interacts.
A) argument list
B) interface to the method
C) parameter list
D) internal detail
A) argument list
B) interface to the method
C) parameter list
D) internal detail
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
29
____ is the ability of a method to act appropriately depending on the context.
A) Cohesion
B) Chameleon
C) Integrity
D) Polymorphism
A) Cohesion
B) Chameleon
C) Integrity
D) Polymorphism
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
30
The method name and parameter list constitute the ____.
A) signature
B) input list
C) title
D) variable list
A) signature
B) input list
C) title
D) variable list
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
31
____ occurs when methods do not depend on others.
A) Tight coupling
B) Loose coupling
C) Data coupling
D) Abstract coupling
A) Tight coupling
B) Loose coupling
C) Data coupling
D) Abstract coupling
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
32
Arrays, unlike simple built-in types, are passed by ____.
A) deference
B) value
C) reference
D) configuration
A) deference
B) value
C) reference
D) configuration
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
33
When a data item is known to all of a program's modules, it is a(n) ____________________ data item.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
34
Programmers use the term ____ to describe any extra time and resources required by an operation.
A) black box
B) overhead
C) overload
D) cohesion
A) black box
B) overhead
C) overload
D) cohesion
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
35
____ provide an overview of input to the method, the processing steps that must occur, and the result.
A) Stacks
B) Hierarchy charts
C) IPO charts
D) Flowcharts
A) Stacks
B) Hierarchy charts
C) IPO charts
D) Flowcharts
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
36
____ occurs when methods excessively depend on each other and makes programs more prone to errors.
A) Late coupling
B) Loose coupling
C) Tight coupling
D) Weak coupling
A) Late coupling
B) Loose coupling
C) Tight coupling
D) Weak coupling
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
37
A method that calls itself is a ____.
A) recursive method
B) repeated method
C) self-referencing method
D) simple method
A) recursive method
B) repeated method
C) self-referencing method
D) simple method
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
38
When the method ends at the ____________________ statement, the locally declared parameter variable ceases to exist.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
39
A method can return nothing, in which case the method is a ____ method.
A) null
B) void
C) nul
D) empty
A) null
B) void
C) nul
D) empty
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
40
A(n) ____________________ chart is a tool that identifies and categorizes each item needed within the method as pertaining to input, processing, or output.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
41
Discuss loose coupling.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
42
Match between columns
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
43
List the items that must be included within the method declaration's parentheses.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
44
Describe recursion.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
45
Explain what happens when you call a method and the method ends.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
46
List the four things you need to know when you call a method from a program or other method.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
47
Discuss tight coupling.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
48
Describe how you create and use a method with multiple parameters.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
49
Discuss the cumulative summing relationship.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
50
Describe what a method's return statement can return.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
51
List the three things that you need to know to design effective methods.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck