Skip to content

Conversation

@phrdang
Copy link
Member

@phrdang phrdang commented Jul 1, 2021

Location

  • Ch. 14.7 Practice

Changes

  • Add string formatting to print money values in standard form
  • Change monetary parameters to doubles instead of ints
  • Remove unused diff variable in Bank.withdraw()
  • Use getMessage() instead of toString() for handling
    NotEnoughMoneyException
    to avoid printing full exception name
  • Update deposit method to account for negative amounts

- Add string formatting to print money values in standard form
- Change monetary parameters to `double`s instead of `int`s
- Remove unused `diff` variable in `Bank.withdraw()`
- Use `getMessage()` instead of `toString()` for handling
`NotEnoughMoneyException`
to avoid printing full exception name
- Update `deposit` method to account for negative `amount`s
@phrdang phrdang removed request for JJ27 and atijmahesh July 1, 2021 20:20
Moved the exception throw into one line
Copy link
Member

@AlveeraMunshi AlveeraMunshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works as intended and style is good, looks ready to merge

@AlveeraMunshi AlveeraMunshi merged commit 5e1a52e into master Jul 1, 2021
@AlveeraMunshi AlveeraMunshi deleted the fix-bank branch July 1, 2021 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants