1 | public class Part implements Serializable {↵ | | 1 | public class MonetoryAmount implements Serializable {↵
|
|
2 | private String name;↵ | | 2 | private ↵
|
3 | private String description↵ | | 3 | BigDecimal amount;↵
|
4 | ;↵ | | 4 | private Currency currency;↵
|
| | | 5 | ↵
|
5 | public Part() {↵ | | 6 | public ↵
|
6 | }↵ | | |
|
|
7 | public Part(String name) {↵ | | |
|
8 | this.name = name↵ | | 7 | MonetoryAmount(BigDecimal amount, Currency currency) {↵
|
| | | 8 | this.amount = amount;↵
|
9 | ;↵ | | 9 | this.currency = currency;↵
|
10 | }↵ | | 10 | }↵
|
| | | 11 | ↵
|
11 | public Part(String name, String description) {↵ | | 12 | public ↵
|
12 | this.name = name;↵ | | |
|
13 | this.description = description↵ | | 13 | BigDecimal getAmount() {↵
|
14 | ;↵ | | 14 | return amount;↵
|
15 | }↵ | | 15 | }↵
|
| | | 16 | ↵
|
16 | public String getName() {↵ | | 17 | public ↵
|
17 | return name;↵ | | |
|
18 | }↵ | | |
|
|
19 | public String getDescription↵ | | 18 | void setAmount(BigDecimal amount) {↵
|
| | | 19 | this.amount = amount;↵
|
| | | 20 | }↵
|
|
20 | () {↵ | | 21 | public Currency getCurrency() {↵
|
21 | return description;↵ | | 22 | return currency;↵
|
22 | }↵ | | 23 | }↵
|
|
23 | public void setDescription(String description) {↵ | | 24 | public void set↵
|
24 | this.description = description | | 25 | Currency(Currency currency) {↵
|
| | | 26 | this.currency = currency
|