-
Notifications
You must be signed in to change notification settings - Fork 0
/
Depo.java
41 lines (32 loc) · 856 Bytes
/
Depo.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
package Project;
public class Depo {
private int depoId;
private String depoAdi;
// Constructor with all fields
public Depo(int depoId, String depoAdi) {
this.depoId = depoId;
this.depoAdi = depoAdi;
}
// Constructor without depoId (for new entries)
public Depo(String depoAdi) {
this.depoAdi = depoAdi;
}
// Getter and Setter methods
public int getDepoId() {
return depoId;
}
public void setDepoId(int depoId) {
this.depoId = depoId;
}
public String getDepoAdi() {
return depoAdi;
}
public void setDepoAdi(String depoAdi) {
this.depoAdi = depoAdi;
}
// Override toString method for JComboBox display
@Override
public String toString() {
return depoAdi;
}
}