-
Notifications
You must be signed in to change notification settings - Fork 0
/
Item.java
45 lines (37 loc) · 866 Bytes
/
Item.java
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
38
39
40
41
42
43
44
45
package com.basket.manager;
public class Item {
private String itemName;
private int quantity;
private double price;
public Item(){}
public Item(String itemName, int quantity, double price) {
super();
this.itemName = itemName;
this.quantity = quantity;
this.price = price;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String toString(){
return "\n----Item Detail----" +
"\nItemName= " + itemName +
"\nQuantity= " + quantity +
"\nUnitPrice= " + price;
}
}