File: LineItem.java

package info (click to toggle)
axis 1.4-29
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 52,100 kB
  • sloc: java: 129,124; xml: 10,602; jsp: 983; sh: 84; cs: 36; makefile: 18
file content (37 lines) | stat: -rw-r--r-- 882 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package samples.bidbuy;

import java.math.BigDecimal;

public class LineItem {

    // constructors

    public LineItem() {};

    public LineItem(String name, int quantity, BigDecimal price) {
         this.name=name;
         this.quantity=quantity;
         this.price=price;
    }

    public LineItem(String name, int quantity, String price) {
         this.name=name;
         this.quantity=quantity;
         this.price=new BigDecimal(price);
    }

    // properties

    private String name;
    public String getName() { return name; }
    public void setName(String value) { name=value; }

    private int quantity;
    public int getQuantity() { return quantity; }
    public void setQuantity(int value) { quantity=value; }

    private BigDecimal price;
    public BigDecimal getPrice() { return price; }
    public void setPrice(BigDecimal value) { price=value; }

}