In: Computer Science
9. Judging by the name of the method, which of the following methods would most likely be a mutator method?
A) getListOfDeposits. B) printAccountBalance. C) isOverdrawn. D) Deposit.
-
10. Mutator methods exhibit which of the following types of side effect?
A) Modification of the implicit parameter. B) Modification of an explicit parameter.C) Production of printed output.
-
11. Given the following method header, other would be classified as which of the following parameter types? public void transfer(double amount, BankAccount other)
A) Implicit parameter. B) Explicit parameter. C) Global parameter. D) Mutable parameter.
-
12. In Java, which of the following mechanisms describe the copying of an object reference into a parameter variable?
A) Call-by-reference . B) Call-by-value. C) Call-by-precondition. D) Call-by-object.
9.
Judging by the name of the method, deposit methods would most likely be a mutator method.
Option d
A mutator method object states are changed.
Types of the mutator methods are two types those are
10.
Mutator methods exhibit Modification of the implicit parameter types of side effect.
Option a
A mutator method object states are changed and it have some side effects.
Side effect of the Mutator method Modification of the implicit parameter, in general parameter variable are not modified by the methods.
11.
Given the following method header, other would be classified as Explicit parameter type public void transfer(double amount, BankAccount other)
Option b
public void transfer(double amount, BankAccount other)
Where
Name of the method is transfer.
Explicit parameters:
amount and other both are explicit parameters.
12.
In Java, Call-by-value mechanisms describe the copying of an object reference into a parameter variable.
Option b
Call-by-value mechanisms the value pass by the arguments to the called function.
Calling function parameter values are not effects the main program variable.
The address not shared in between arguments and parameters in call by value technique.