What does the following method do? Give example

February 26, 2015 at 21:49:08
Specs: Macintosh
What does the following method do? Give an example of how you can cal lthe method.
public class BankAccount {
public void mystery(BankAccount that, double amount) {
this.balance = this.balance - amount;
that.balance = that.balance + amount; }
. . . // Other bank account methods }

See More: What does the following method do? Give example

Report •

#1
February 26, 2015 at 22:49:55
It answers a homework question. We don't.

Report •

#2
February 27, 2015 at 13:31:14
Actually that code does no effect to the source bank account. mystery is a function that accepts 2 parameters, the bank account (probably a data structure or aggregate) and the amount in double precision decimal.
For instance, from another point in the program, you want to call that function. Simply type in mystery(mybankaccount, 63727.28);.

Report •

#3
February 27, 2015 at 13:43:27
From that explanation I'm guessing that you are not familiar with Java.

Report •
Related Solutions


Ask Question