-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer.java
More file actions
62 lines (50 loc) · 1.28 KB
/
Customer.java
File metadata and controls
62 lines (50 loc) · 1.28 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.acc.lkm.CollectionDemo;
import java.io.Serializable;
public class Customer implements Serializable {
private Integer cust_id;
private String name;
private String product;
private double price;
// Constructor
public Customer(int cust_id, String name, String product, double price) {
this.cust_id = cust_id;
this.name = name;
this.product = product;
this.price = price;
}
// Getters
public int getCust_id() {
return cust_id;
}
public String getName() {
return name;
}
public String getProduct() {
return product;
}
public double getPrice() {
return price;
}
// Setters
public void setCust_id(int cust_id) {
this.cust_id = cust_id;
}
public void setName(String name) {
this.name = name;
}
public void setProduct(String product) {
this.product = product;
}
public void setPrice(double price) {
this.price = price;
}
@Override
public String toString() {
return "Customer{" +
"cust_id='" + cust_id + '\'' +
", name='" + name + '\'' +
", product='" + product + '\'' +
", price=" + price +
'}';
}
}