Exam 6: Using Methods
Exam 1: An Overview of Computers and Logic50 Questions
Exam 2: Understanding Structure50 Questions
Exam 3: Making Decisions50 Questions
Exam 4: Looping50 Questions
Exam 5: Arrays50 Questions
Exam 6: Using Methods50 Questions
Exam 7: Object-Oriented Programming50 Questions
Select questions type
Case 1
You have just starting working at Quantum Company. As a new programmer, you have been asked to review and correct various pseudocode.
-There is a method with the header: void printData(num x,string y).There is a declared numeric variable: test.Which of the following is a correct method call?
(Multiple Choice)
4.8/5
(35)
A method's name and parameter list constitute the method's ____.
(Multiple Choice)
4.9/5
(40)
The scope of a variable or constant is ____ to the method or program in which it is declared.
(Multiple Choice)
4.9/5
(34)
Variables and constants declared within a method are ____ only within that method.
(Multiple Choice)
4.8/5
(35)
Programmers say the data items are ____ only within the method or program in which they are declared.
(Multiple Choice)
4.8/5
(42)
Case 1
You have just starting working at Quantum Company. As a new programmer, you have been asked to review and correct various pseudocode.
-There is a method with the header: void printData(num x,string y). There is a declared a numeric variable: test. What does this method return?
(Multiple Choice)
4.8/5
(44)
____ variables and constants are those that are known to the entire program.
(Multiple Choice)
4.8/5
(30)
Creating submethods makes the calling method's logic more concise,easier to read,and somewhat easier to identify as structured.
(True/False)
4.7/5
(45)
Methods are considered ____,that is,they can more easily be transported to and reused by multiple programs when variables and constants are declared within the methods that use them.
(Multiple Choice)
4.9/5
(36)
Case 1
You have just starting working at Quantum Company. As a new programmer, you have been asked to review and correct various pseudocode.
-The following pseudocode is not working correctly.The code should add price and tax.What code needs to be corrected? num computeSum(num price,num tax)
Declarations
Num result
Result = price + tax
Return
(Multiple Choice)
4.8/5
(41)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)