Question

In: Computer Science

9. Judging by the name of the method, which of the following methods would most likely...

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.

Solutions

Expert Solution

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

  • Depposit
  • Withdraw

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.


Related Solutions

Identify the deprecation methods and which depreciation method would be most useful for a company that...
Identify the deprecation methods and which depreciation method would be most useful for a company that wants to match more of the cost of the asset with revenues generated from the asset in the early years of asset use. *All popular methods.
1. Which of the following goods would be the most likely to be subject to a...
1. Which of the following goods would be the most likely to be subject to a government-imposed tax? A Cereal B Bottles of alcohol, such as whiskey and gin C Shoes 2. Which of the following is likely to have the largest elasticity of supply? A The producer of vanilla ice cream B The producer of yachts C A dentist 3. Assume that as your income increases, your consumption of burgers decreases. We can assume that your income elasticity of...
Which revenue recognition method would most likely be used by a retailer? Select one: a. upon...
Which revenue recognition method would most likely be used by a retailer? Select one: a. upon cash collection b. upon delivery c. during production d. point of sale Which of the following is a disadvantage of issuing bonds instead of common shares? Select one: a. The principal of the debt must be repaid at maturity. b. Earnings per share will increase. c. Shareholder control is not affected. d. Income to common shareholders may increase. When bonds are issued at a...
Which of the following would be most likely to increase the supply of loanable funds and...
Which of the following would be most likely to increase the supply of loanable funds and lead to low interest rates? a. Expansionary monetary policy that resulted in high rates of inflation. b. Constant policy shifts that generate uncertainty and reduce investment. c. Demographic shifts that increase the number of people in age categories with high saving rates relative to the number in age categories with a strong demand for loanable funds. d. Large budget deficits that push the government...
Which of the following would the board of directors of an organisation most likely need to...
Which of the following would the board of directors of an organisation most likely need to know as part of their organisation’s cyber security risk reporting framework: Select all that apply. 1. Cyber security budgets 2. Feedback on cyber security events 3. Leadership roles for cyber security 4. Links between cyber security objectives and organisational objectives 5. Officers responsible for making cyber security decisions 6. Vendor due diligence
Which of the following would most likely be classified as a current liability? A. Mortgage payable...
Which of the following would most likely be classified as a current liability? A. Mortgage payable B. Portion of long-term debt due within one year C. Two-Year notes payable D. Bonds payable
Which of the following would most likely cause both a decrease in the price of McDonalds’...
Which of the following would most likely cause both a decrease in the price of McDonalds’ Big Mac hamburgers and a decrease in the number sold? a. an increase in the supply of McDonalds’ Big Mac hamburgers b. an increase in the demand for McDonalds’ Big Mac hamburgers c. a decrease in the supply of McDonalds’ Big Mac hamburgers d. a decrease in the demand for McDonalds’ Big Mac hamburgers
Which of the following assets would most likely be listed last on a statement of financial...
Which of the following assets would most likely be listed last on a statement of financial position? Select one: a. Land. b. Cash. c. Accounts receivable. d. Equipment. 2. Which of the following will not cause a change in the owners' equity of a business? Select one: a. Purchase of land with cash. b. Withdrawal of cash by the owner. c. Sale of land at a profit. d. Losses from unprofitable operations. 3. Decreases in owners' equity are caused by:...
1. (a) Which of the following types of biomolecules would most likely be found embedded in...
1. (a) Which of the following types of biomolecules would most likely be found embedded in a phospholipid bilayer?
which of the following organisms would be most likely to fossilize? a common slug a common...
which of the following organisms would be most likely to fossilize? a common slug a common bird a rare bird a rare slug
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT