Skip to content

Commit 1ce5e47

Browse files
Karen AlabiKaren Alabi
authored andcommitted
feat: adds basic Clothing Item class structure
1 parent 40a0b07 commit 1ce5e47

File tree

1 file changed

+65
-0
lines changed
  • lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/wardrobecollection

1 file changed

+65
-0
lines changed

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/wardrobecollection/ClothingItem.java

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,70 @@
33
import java.util.ArrayList;
44

55
public class ClothingItem {
6+
// Member variables
7+
private String name;
8+
private String type;
9+
private String color;
10+
private String size;
11+
private double value;
12+
private PersonalCloset.Season season;
613

14+
// Constructor
15+
public ClothingItem (String name, String type, String color, String size, double value, PersonalCloset.Season season) {
16+
this.name = name;
17+
this.type = type;
18+
this.color = color;
19+
this.size = size;
20+
this.value = value;
21+
this.season = season;
22+
}
23+
24+
// Getters and Setters
25+
public String getName() {
26+
return name;
27+
}
28+
29+
public void setName(String name) {
30+
this.name = name;
31+
}
32+
33+
public String getType() {
34+
return type;
35+
}
36+
37+
public void setType(String type) {
38+
this.type = type;
39+
}
40+
41+
public String getColor() {
42+
return color;
43+
}
44+
45+
public void setColor(String color) {
46+
this.color = color;
47+
}
48+
49+
public String getSize() {
50+
return size;
51+
}
52+
53+
public void setSize(String size) {
54+
this.size = size;
55+
}
56+
57+
public double getValue() {
58+
return value;
59+
}
60+
61+
public void setValue(double value) {
62+
this.value = value;
63+
}
64+
65+
public PersonalCloset.Season getSeason() {
66+
return season;
67+
}
68+
69+
public void setSeason(PersonalCloset.Season season) {
70+
this.season = season;
71+
}
772
}

0 commit comments

Comments
 (0)