Solved

We Want to Change the BankAccount Class So That All

Question 72

Multiple Choice

We want to change the BankAccount class so that all accounts will have a monthly fee.The instance variable monthlyFee will hold the monthly fee.Which of the following constructors properly sets the monthly fee to a default value of 20?


A) public BankAccount (double initialBalance)
{
balance = initialBalance;
monthlyFee = 20;
}
B) public Bankaccount (double initialBalance)
{
balance = initialBalance;
double monthlyFee = 20;
}
C) public BankAccount (double initialBalance)
{
balance = initialBalance;
monthlyFee = initialBalance-20;
}
D) public BankAccount (double initialBalance)
{
balance = initialBalance-20;
}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions