Question 14
Back to Exercise
Which code follows "tell, don't ask"?
- A acc.setBalance(acc.getBalance() - 100)
- B acc.withdraw(100) Correct
- C if (acc.getBalance() > 100) acc.balance -= 100
- D Account.balance -= 100
Correct Answer: Option B
The account applies its own rules.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!