WEEK 5 QUIZ:
1. Question : (TCO 5) What name is best suited to a module that calculates
overtime pay?
Student Answer: calcO( )
calculate overtime( )
cO( )
calculateOvertime( )
In
...
WEEK 5 QUIZ:
1. Question : (TCO 5) What name is best suited to a module that calculates
overtime pay?
Student Answer: calcO( )
calculate overtime( )
cO( )
calculateOvertime( )
Instructor Explanation:
See the Week 5 Lecture, Doc Sharing files, and textbook references to Chapters 3, 5, and 13.
Question 2. Question : (TCO 5) In VBScript, the proper keyword/s to end a function
is/are .
Student Answer:
End
Return
End Function
End Sub
Instructor Explanation:
See the Week 5 Lecture, Doc Sharing files, and textbook references to Chapters 3, 5, and 13.
Question 3. Question : (TCO 5) What statement is not an advantage of using
modularization?
Student Answer: Easier to debug programs
Programs to be worked on by separate programmers
Code is reusable.
Programs are longer and more complex.
Instructor Explanation:
See the Week 5 Lecture, Doc Sharing files, and textbook references to Chapters 3, 5, and 13.
Question 4. Question : (TCO 5) Programmers should strive to eliminate all
scoped variables from their code in modules.
Student Answer: implicit
local
global
local and global
Instructor Explanation:
See the Week 5 Lecture, Doc Sharing files, and textbook references to Chapters 3, 5, and 13.
Question 5. Question : (TCO 5) What is a feature of good program design?
Student Answer: Short identifiers are preferred over descriptive identifiers.
Literal constants are preferred over named constants.
There should never be empty lines between blocks of related statements.
Subroutines and Functions should be used to modularize
major programming tasks.
Instructor Explanation:
See the Week 5 Lecture, Doc Sharing files, and textbook references to Chapters 3, 5, and 13.
Question 6. Question : (TCO 5) Which VBScript statements below represent an
acceptable definition for the subroutine displayResults( )?
Student Answer:
Sub displayResults( ) WScript.StdOut.WriteLine(“RESULTS“) End Sub
Function displayResults( ) WScript.StdOut.WriteLine(“RESULTS“) End Function
Subroutine displayResults( ) WScript.StdOut.WriteLine(“RESULTS“) End Subroutine
Call displayResults( ) WScript.StdOut.WriteLine(“RESULTS“) End Call
Instructor Explanation:
See the Week 5 Lecture, Doc Sharing files, and textbook references to Chapters 3, 5, and 13.
[Show More]