Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull up "times" operation #10

Merged
merged 9 commits into from
Sep 29, 2022
Merged

Commits on Sep 29, 2022

  1. inline factory methods in Dollar.times and Franc.times

    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    99e36ad View commit details
    Browse the repository at this point in the history
  2. make Money a concrete class

    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    3401350 View commit details
    Browse the repository at this point in the history
  3. add test to verify different class equality when currency and amount …

    …are the same
    
    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    79ca053 View commit details
    Browse the repository at this point in the history
  4. change equality logic to use current field instead of checking the co…

    …nstructor type
    
    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    ae56fe6 View commit details
    Browse the repository at this point in the history
  5. make Dollar return an instance of Money in Dollar.times

    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    d2c5996 View commit details
    Browse the repository at this point in the history
  6. make Franc return an instance of Money in Franc.times

    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    a8c9823 View commit details
    Browse the repository at this point in the history
  7. return current currency when performing Dollar.times instead of hardc…

    …oded USD
    
    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    924d12e View commit details
    Browse the repository at this point in the history
  8. return current currency instead of hardcoded CHF when executing Franc…

    ….times
    
    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` 👈🏼
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    0d89759 View commit details
    Browse the repository at this point in the history
  9. pull up .times operation to Money class

    Tasklist:
    - $5 + 10CHF = $10 if rate is 2:1 🎯
    - $5 * 2 = $10 ✅
    - Make "amount" private ✅
    - Dollar side-effects? ✅
    - Money rounding?
    - equals() ✅
    - Equal null
    - Equal object
    - 5 CHF * 2 = 10 CHF ✅
    - Dollar/Franc duplication
    - Common `.equals` ✅
    - Common `.times` ✅
    - Compare Francs with Dollars ✅
    - Currency? ✅
    - Merge multiplication tests?
    kaiosilveira committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    8dd269f View commit details
    Browse the repository at this point in the history