Deck 3: 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
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/48
Play
Full screen (f)
Deck 3: Modules
1
To create a module you write its ____________.
A)Definition
B)Body
C)Pseudocode
D)Flowchart
E)Name
A)Definition
B)Body
C)Pseudocode
D)Flowchart
E)Name
A
2
The following is an example of a module _________________.
Call showNetPay()
A)Definition
B)Header
C)Body
D)Display
E)Execution
Call showNetPay()
A)Definition
B)Header
C)Body
D)Display
E)Execution
E
3
What phrase is placed in the starting terminal symbol of a module in a flowchart?
A)Start
B)Begin
C)Name of the module
D)Continue
E)Resume
A)Start
B)Begin
C)Name of the module
D)Continue
E)Resume
C
4
What tool would a programmer use to visualize the relationship between modules?
A)Flowchart
B)Hierarchy charts
C)Pseudo charts
D)Modular charts
E)None of the above
A)Flowchart
B)Hierarchy charts
C)Pseudo charts
D)Modular charts
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
5
Function is another name for _____________.
A)Module
B)Variable
C)Reference
D)Sub class
E)None of the above
A)Module
B)Variable
C)Reference
D)Sub class
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
6
In a flowchart,the module call is represented by a ____________ symbol with vertical bars at each side.
A)Parallelogram
B)Square
C)Rhombus
D)Rectangle
E)None of the above
A)Parallelogram
B)Square
C)Rhombus
D)Rectangle
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
7
______________ variables are useful for establishing two-way communication between modules.
A)Value
B)Constant
C)Reference
D)I/O
E)None of the above
A)Value
B)Constant
C)Reference
D)I/O
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
8
Passing an argument by ________ means that only a copy of the argument's value is passed into the parameter variable.
A)Value
B)Constant
C)Reference
D)Variable
E)None of the above
A)Value
B)Constant
C)Reference
D)Variable
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
9
To execute a module,we must ____________ it.
A)Parse
B)Debug
C)Call
D)Compile
E)Define
A)Parse
B)Debug
C)Call
D)Compile
E)Define
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
10
The module definition comprises the module header and the module __________.
A)Body
B)Statements
C)Call
D)Arguments
E)Parameters
A)Body
B)Statements
C)Call
D)Arguments
E)Parameters
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
11
Modules make it impossible for programmers to work in teams.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
12
The top-down design process is sometimes called stepwise refinement.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
13
Modules are commonly called what?
A)Procedures
B)Subroutines
C)Subprograms
D)Methods
E)All of the above
A)Procedures
B)Subroutines
C)Subprograms
D)Methods
E)All of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
14
What is the term used for the variable that receives an argument that passed into a module?
A)Global
B)Local
C)Parameter
D)Constant
E)None of the above
A)Global
B)Local
C)Parameter
D)Constant
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
15
Which type of variable is visible to every module and the entire program?
A)Local
B)Pass by value
C)Reference
D)Global
E)Pass by reference
A)Local
B)Pass by value
C)Reference
D)Global
E)Pass by reference
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
16
A pass by _________ argument means that the argument is passed into a parameter that will reference the content of the argument in the module.
A)Value
B)Constant
C)Reference
D)Variable
E)None of the above
A)Value
B)Constant
C)Reference
D)Variable
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
17
Which of the following is not a benefit of using modules?
A)Simpler Code
B)Faster Development
C)Code Reuse
D)Better Testing
E)None of the above
A)Simpler Code
B)Faster Development
C)Code Reuse
D)Better Testing
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
18
What is the term used for the memory address of the location of the statement immediately after the module call?
A)Return address
B)Return point
C)Continue point
D)Resume point
E)Resume address
A)Return address
B)Return point
C)Continue point
D)Resume point
E)Resume address
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
19
Which type of variable is not recommended to be used in programs because they make programs hard to understand and debug?
A)Local
B)Pass by value
C)Reference
D)Global
E)Pass by reference
A)Local
B)Pass by value
C)Reference
D)Global
E)Pass by reference
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
20
When an argument is passed by _______,it is not affected by a change of the content of the parameter variable.
A)Value
B)Constant
C)Reference
D)Variable
E)None of the above
A)Value
B)Constant
C)Reference
D)Variable
E)None of the above
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
21
A ______________ variable acts as an alias for the variable that was passed into the module through an argument.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
22
Any piece of data that is passed into a module when a module is executed is called an _____________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
23
In most languages a module definition has three parts: a header,body,and footer.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
24
An attempt to pass a non-variable argument into a reference variable parameter will cause an error.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
25
When an argument is passed by value,the communication channel works only in one direction.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
26
The arguments in a module call and the parameters listed in the module header must be of compatible data types.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
27
The scope of the parameter variables is the entire program and it is visible to any statement in the program.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
28
A __________ variable is declared inside a module and cannot be accessed by statements that are outside the module.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
29
The technique used by programmers to break down an algorithm into modules is called _____________________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
30
Programming languages provide ____________ different ways to pass arguments to modules.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
31
A ___________ constant is a named constant that is available to every module in the program.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
32
A ___________ is a group of statements that performs a specific task which is resident within the program.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
33
Programmers use _____________ to graphically depict the flow of logic inside a module.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
34
A pass by reference argument establishes a two-way communication with the module,but the value of the argument cannot be modified via the reference variable.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
35
Structure charts are also known as __________________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
36
Modules can be written for commonly needed tasks,and those modules can be incorporated into each program that needs them.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
37
The term ________________ is used when a large task is divided into several smaller tasks that are easily performed.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
38
The hierarchy chart does not reveal any details of the steps taken inside the module.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
39
A module can have two variables of the same name because they are within the same scope.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
40
The scope of a variable is the segment of the program in which the variable can be accessed.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
41
A program's code tends to simpler and easier to understand when it is ____________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
42
The __________ of the module is a list of statements that belong to the module.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
43
It is common practice in most programming languages to put a set of ____________ after a module name.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
44
The _________ of the program transfers to a module when the module call is made from the program.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
45
Modules that use global variables cannot be used in a different ___________ unless they are redesigned.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
46
The ending terminal symbol for modules reads ____________ because it marks the point where the computer returns to the part of the program that called the module.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
47
The scope of a ___________ variable begins at the variable's declaration and ends at the end of the module in which the variable is declared.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
48
Because modules perform actions,most programmers prefer to use ____________ in module names.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck