-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFurnitureData.java
More file actions
39 lines (30 loc) · 824 Bytes
/
Copy pathFurnitureData.java
File metadata and controls
39 lines (30 loc) · 824 Bytes
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
package Room_Planner;
public class FurnitureData implements Comparable {
private String furniture;
private int count;
public FurnitureData(String furniture, int count) {
this.furniture = furniture;
this.count = count;
}
public String getFurniture() {
return furniture;
}
public void setFurniture(String furniture) {
this.furniture = furniture;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public void incrementCount()
{
count++;
}
@Override
public int compareTo(Object o) {
FurnitureData other = (FurnitureData) o;
return furniture.compareToIgnoreCase(other.getFurniture());
}
}