Solved

We Want to Change the BankAccount Class So That All

Question 2

Multiple Choice

We want to change the BankAccount class so that all accounts will have a monthly fee. When a BankAccount is created, its monthly fee is set and cannot be changed. The instance variable monthlyFee will hold the monthly fee. Which of the following methods deducts the value of the monthly fee from the account?


A) public void chargeFee()
{
Balance = balance - monthlyFee;
}
B) public void chargeFee()
{
InitialBalance = initialBalance - monthlyFee;
}
C) public void chargeFee()
{
Balance = monthlyFee;
}
D) public void chargeFee()
{
Balance - monthlyFee;
}

Correct Answer:

verifed

Verified

Related Questions