01: package samples.bidbuy;
02:
03: import java.math.BigDecimal;
04:
05: public class LineItem {
06:
07: // constructors
08:
09: public LineItem() {
10: };
11:
12: public LineItem(String name, int quantity, BigDecimal price) {
13: this .name = name;
14: this .quantity = quantity;
15: this .price = price;
16: }
17:
18: public LineItem(String name, int quantity, String price) {
19: this .name = name;
20: this .quantity = quantity;
21: this .price = new BigDecimal(price);
22: }
23:
24: // properties
25:
26: private String name;
27:
28: public String getName() {
29: return name;
30: }
31:
32: public void setName(String value) {
33: name = value;
34: }
35:
36: private int quantity;
37:
38: public int getQuantity() {
39: return quantity;
40: }
41:
42: public void setQuantity(int value) {
43: quantity = value;
44: }
45:
46: private BigDecimal price;
47:
48: public BigDecimal getPrice() {
49: return price;
50: }
51:
52: public void setPrice(BigDecimal value) {
53: price = value;
54: }
55:
56: }
|