01: package invoice;
02:
03: /**
04: * @author S.Chassande-Barrioz
05: */
06: public class Product {
07: private String name;
08: private char size;
09: private String color;
10: private float weight;
11: private float price;
12:
13: public Product() {
14: }
15:
16: public Product(String name, char size, String color, float weight,
17: float price) {
18: this .name = name;
19: this .size = size;
20: this .color = color;
21: this .weight = weight;
22: this .price = price;
23: }
24:
25: public String toString() {
26: return "name:" + name + " / size:" + size + " / color:" + color
27: + " / weight:" + weight + " / price:" + price;
28: }
29:
30: public String getName() {
31: return name;
32: }
33:
34: public void setName(String name) {
35: this .name = name;
36: }
37:
38: public char getSize() {
39: return size;
40: }
41:
42: public void setSize(char size) {
43: this .size = size;
44: }
45:
46: public String getColor() {
47: return color;
48: }
49:
50: public void setColor(String color) {
51: this .color = color;
52: }
53:
54: public float getWeight() {
55: return weight;
56: }
57:
58: public void setWeight(float weight) {
59: this .weight = weight;
60: }
61:
62: public float getPrice() {
63: return price;
64: }
65:
66: public void setPrice(float price) {
67: this.price = price;
68: }
69: }
|