KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > invoice > Product


1 package invoice;
2
3 /**
4  * @author S.Chassande-Barrioz
5  */

6 public class Product {
7     private String JavaDoc name;
8     private char size;
9     private String JavaDoc color;
10     private float weight;
11     private float price;
12
13     public Product() {
14     }
15
16     public Product(String JavaDoc name, char size, String JavaDoc color, float weight, float price) {
17         this.name = name;
18         this.size = size;
19         this.color = color;
20         this.weight = weight;
21         this.price = price;
22     }
23
24     public String JavaDoc toString() {
25         return "name:" + name
26             + " / size:" + size
27             + " / color:" + color
28             + " / weight:" + weight
29             + " / price:" + price;
30     }
31
32     public String JavaDoc getName() {
33         return name;
34     }
35
36     public void setName(String JavaDoc name) {
37         this.name = name;
38     }
39
40     public char getSize() {
41         return size;
42     }
43
44     public void setSize(char size) {
45         this.size = size;
46     }
47
48     public String JavaDoc getColor() {
49         return color;
50     }
51
52     public void setColor(String JavaDoc color) {
53         this.color = color;
54     }
55
56     public float getWeight() {
57         return weight;
58     }
59
60     public void setWeight(float weight) {
61         this.weight = weight;
62     }
63
64     public float getPrice() {
65         return price;
66     }
67
68     public void setPrice(float price) {
69         this.price = price;
70     }
71 }
72
Popular Tags