File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 1010 - Currency safety
1111 - Value Object
1212 - Financial operations
13+ - Currency
14+ - Financial
15+ - Immutable
16+ - Value Object
1317---
1418
1519## Also known as
1620
17- * Value Object
21+ * Monetary Value Object
1822
1923## Intent of Money Design Pattern
2024
@@ -43,9 +47,6 @@ In this example:
4347### Money Class
4448
4549``` java
46- package com.iluwatar ;
47-
48- import lombok.Getter ;
4950
5051/**
5152 * Represents a monetary value with an associated currency.
@@ -155,10 +156,10 @@ The Money pattern should be used in scenarios where:
155156
1561571. **Value Object**
157158 Money is a classic example of the Value Object pattern, where objects are immutable and define equality based on their value.
158-
159+ Link:https://martinfowler.com/bliki/ValueObject.html
1591602. **Factory Method**
160161 Factories can be employed to handle creation logic, such as applying default exchange rates or rounding rules.
161-
162+ Link:https://www.geeksforgeeks.org/factory-method-for-designing-pattern/
162163---
163164
164165## References and Credits
Original file line number Diff line number Diff line change 3737
3838 <artifactId >money</artifactId >
3939
40- <properties >
41- <maven .compiler.source>17</maven .compiler.source>
42- <maven .compiler.target>17</maven .compiler.target>
43- <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
44- </properties >
40+
4541 <dependencies >
4642 <dependency >
4743 <groupId >org.junit.jupiter</groupId >
You can’t perform that action at this time.
0 commit comments