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

Implement currency #9

Merged
merged 12 commits into from
Sep 29, 2022
Merged

Implement currency #9

merged 12 commits into from
Sep 29, 2022

Commits on Sep 28, 2022

  1. add test to assert for currency

    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 28, 2022
    Configuration menu
    Copy the full SHA
    571b98e View commit details
    Browse the repository at this point in the history
  2. add abstract currency method to Money and implementations for Dollar …

    …and Franc
    
    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 28, 2022
    Configuration menu
    Copy the full SHA
    0e7c275 View commit details
    Browse the repository at this point in the history
  3. add currency as a instance variable in Franc

    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 28, 2022
    Configuration menu
    Copy the full SHA
    1563572 View commit details
    Browse the repository at this point in the history
  4. add currency as a instance variable of Dollar

    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 28, 2022
    Configuration menu
    Copy the full SHA
    a31298a View commit details
    Browse the repository at this point in the history
  5. introduce currency argument to Franc's constructor

    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 28, 2022
    Configuration menu
    Copy the full SHA
    5c3586a View commit details
    Browse the repository at this point in the history
  6. change Franc.times to use Money.franc factory method

    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 28, 2022
    Configuration menu
    Copy the full SHA
    f8357cc View commit details
    Browse the repository at this point in the history
  7. pass CHF as an argument for currency in Money.franc

    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 28, 2022
    Configuration menu
    Copy the full SHA
    949a278 View commit details
    Browse the repository at this point in the history
  8. use constructor argument currency in Franc

    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 28, 2022
    Configuration menu
    Copy the full SHA
    3764158 View commit details
    Browse the repository at this point in the history
  9. update dollar equality tests to use Money.dollar factory method

    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 28, 2022
    Configuration menu
    Copy the full SHA
    31bd733 View commit details
    Browse the repository at this point in the history
  10. update Dollar to receive currency as a constructor argument

    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 28, 2022
    Configuration menu
    Copy the full SHA
    86483e7 View commit details
    Browse the repository at this point in the history
  11. pull up constructor for Dollar and Franc into Money

    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 28, 2022
    Configuration menu
    Copy the full SHA
    2bdf8b7 View commit details
    Browse the repository at this point in the history
  12. make currency() a getter

    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 28, 2022
    Configuration menu
    Copy the full SHA
    72966f9 View commit details
    Browse the repository at this point in the history