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
Q2: What statement is used to specify the
Q15: What is the return type of a
Q19: Information hiding makes it simpler for the
Q20: Consider the following method comment and method
Q23: We want to create a class that
Q24: What is the name of the utility
Q25: What are the operations that any programmer
Q27: Which of the following corresponds to a
Q40: The public constructors and methods of a
Q42: You should provide documentation comments for _.
A)only
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents