Module Headers Flashcards
1
Q
Module displayOutput ( ) Does this statement a module header?
A
Module displayOutput ( ) Yes, this is a module header.
2
Q
Module displayOutput(String names) Does this statement a module header?
A
Module displayOutput(String names) Yes, this is a module header.
3
Q
Module DisplayOutput() Does this statement a module header?
A
Module DisplayOutput() No, this is NOT a proper module header. The module's name is not in camelCase.
4
Q
Module showOutput(Boolean isAlive) Does this statement a module header?
A
Module showOutput(Boolean isAlive) Yes, this is a module header.
5
Q
Module CalculateAnswer ( ) Does this statement a module header?
A
Module CalculateAnswer ( ) No, this is NOT a proper module header. The module's name is not in camelCase.
6
Q
Module showOutput ( ) Does this statement a module header?
A
Module showOutput ( ) Yes, this is a module header.
7
Q
MODULE shootAlienShip ( ) Does this statement a module header?
A
MODULE shootAlienShip ( ) No, the key-word should be Module, not MODULE. Case matters!
8
Q
Module study (Real EXAMPLES) Does this statement a module header?
A
Module study (Real EXAMPLES) Yes, this is a module header.
9
Q
Module String getString ("Name?") Does this statement a module header?
A
Module String getString ("Name?") No, this is not a module header. This header has a return variable type so it is a function header. Or just remove "String" from the header to make it a module.
10
Q
Module getGoodGrades (Integer studyMore) Does this statement a module header?
A
Module getGoodGrades (Integer studyMore) Yes, this is a module header.
11
Q
Module castSpell (Integer mySpell) Does this statement a module header?
A
Module castSpell (Integer mySpell) Yes, this is a module header.
12
Q
showOutput ( ) Does this statement a module header?
A
showOutput ( ) No, this is NOT a module header. It is a module calling statement.
13
Q
SHOW_OUTPUT ( ) Does this statement a module header?
A
SHOW_OUTPUT ( ) No, this is NOT a module header. This looks like it is trying to be a module calling statement, but the module name is not in camelCase.
14
Q
Module determineAnswer (String msg) Does this statement a module header?
A
Module determineAnswer (String msg) Yes, this is a module header.
15
Q
Module void determineAnswer (String msg) Does this statement a module header?
A
Module void determineAnswer (String msg) No, this is not a module header because it contains a variable return type. Either remove the 'void' to make this a module, or change 'Module' to 'Function' to make it a function.