Ad
  • Custom User Avatar

    The logic in the check() method seems to be wrong. Re-think with following questions

    1. What conditions needs to be checked by the User class before executing the check() method?
    2. How to implement those conditions?
    3. Which of these conditions needs to raise exceptions?

    Follow the DRY (Don't Repeat Yourself) principle.That is why OOP was created.

    1. What made you to repeat the add_cash and withdraw methods? Check your understanding
      All the very best.
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution