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

Introduce factory methods for franc and dollar #8

Merged

Conversation

kaiosilveira
Copy link
Owner

We still have a lot of duplication between Franc and Dollar. This PR implements an intermediary step to address this problem by introducing the factory methods Money.dollar and Money.franc and updating the tests accordingly. Our main goal now is to get rid of these two classes and merge their behaviours into Money. Our task list is:

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?

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?
…d circular dependencies

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?
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?
… test files

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?
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 kaiosilveira merged commit 9baecbe into main Sep 28, 2022
@kaiosilveira kaiosilveira deleted the chapter8/introduce-factory-methods-for-franc-and-dollar branch September 28, 2022 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant