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:

Verified
Correct Answer:
Verified
Q3: A class declaration consists of which of
Q5: Assuming the following code is the body
Q9: Consider the following code to declare a
Q10: Which statement is true about the following
Q11: When drawing complex shapes, provide a(n) _
Q13: You should provide documentation comments for _.<br>A)only
Q18: What is the return type of the
Q20: What is the name of the constructor
Q22: Instance variables that are numbers are initialized
Q77: When are instance variables initialized?<br>A)Instance variables are