You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/wardrobecollection/PersonalCloset.java
+47-24Lines changed: 47 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -34,70 +34,93 @@ public PersonalCloset (String ownerName, int maxCapacity) {
34
34
this.seasonalItems = newHashMap<>();
35
35
}
36
36
37
-
//core methods
37
+
// Core methods
38
38
39
-
// method adds item to closet
39
+
// Method adds item to closet
40
40
publicbooleanaddItem(ClothingItemitem) {
41
-
// if closet is full, cannot add item
42
-
if (items.size(0) >= maxCapacity) {
41
+
// If closet is full, cannot add item
42
+
if (items.size() >= maxCapacity) {
43
43
returnfalse;
44
44
}
45
45
46
-
//adding item to closet and increasing closet total value of closet
46
+
// Adding item to closet and increasing total value of closet
47
47
items.add(item);
48
48
totalValue += item.getValue();
49
49
50
-
// checks what season item is meant for and keeps track of number of items in that season
51
-
Seasonseaason = item.getSeason();
50
+
// Checks what season item is meant for and keeps track of number of items in that season
0 commit comments