Examlex

Solved

Assume the Method Below Has Been Added to the BankAccount

question 79

Multiple Choice

Assume the method below has been added to the BankAccount class. public void transfer (BankAccount source, double amount)
{
Balance = balance + amount;
Source.balance = source.balance - amount;
}
What will be output from the following statements that use the revised BankAccount class?
BankAccount first = new BankAccount (100.0) ;
BankAccount second = new BankAccount (300.0) ;
First.transfer (second, 50.0) ;
System.out.println (first.getBalance() + " "
+ second.getBalance() ) ;


Definitions:

Environmental Impact Statement

A document prepared to describe the effects proposed activities will have on the environment.

Federal Water Pollution Control Act

is a major U.S. law that regulates the discharge of pollutants into the nation's surface waters, aiming to improve water quality.

Clean Water Act

A United States federal law that regulates the discharge of pollutants into the nation's surface waters, including lakes, rivers, streams, and coastal areas.

Underground Waste Disposal

The process of disposing of waste materials by burying them underground, often used for hazardous or toxic wastes.

Related Questions