iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
90.12k stars 26.63k forks source link

Money pattern #1305

Open iluwatar opened 4 years ago

iluwatar commented 4 years ago

Description

The Money design pattern, as described by Martin Fowler, provides a way to encapsulate monetary values and their associated currencies. This pattern helps in handling calculations and operations involving money in a clear and reliable manner, avoiding common issues like rounding errors and ensuring currency consistency.

Key Elements of the Money Pattern:

References

Acceptance Criteria

  1. Create a Money class that encapsulates a monetary value and its associated currency.
  2. Implement operations (addition, subtraction, multiplication) on the Money class that handle currency consistency and rounding issues.
  3. Add functionality for currency conversion with appropriate handling of exchange rates.
sophonie commented 4 years ago

Hi, I am very enthusiasm to lean on that issue. I read the topic of this pattern but what is the purpose of this issue. Would I have to code this pattern in Java ? I don't see your request. Please I would like to have more informations about your aim.

Best regards. Sophonie.

iluwatar commented 3 years ago

Yes @sophonie, I'm sorry for the poor description in this issue. The aim is to create an example implementation of Money pattern in this repository. You can check how the other patterns have been implemented and follow the same style. There are also brief contribution instruction at https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute

Please let me know if you want to try implementing this pattern.

ImLynxie commented 3 years ago

I've submitted a PR for this issue. See -> #1673 Sorry if I didn't let you know before actually working on the pattern. @iluwatar

iluwatar commented 2 years ago

This issue is free for taking again.

Liu-rj commented 2 years ago

Hi, I'd like to work on this issue. Could it be assigned to me if still available?

iluwatar commented 2 years ago

Yes @Liu-rj, please go ahead

iluwatar commented 2 years ago

@Liu-rj are you working on this?

Liu-rj commented 2 years ago

@iluwatar yeah, I will fix that pr #1984 these days once I have time.

hheanly123 commented 1 year ago

Hi, I would like to take on this issue!

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.