Skip to content

Commit 49d37d7

Browse files
author
ivanhromovyi
committed
implement storeService using 'with' function
1 parent c03eb67 commit 49d37d7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/kotlin/mate/academy/StoreService.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ package mate.academy
33
class StoreService {
44
// Function to update the store's stock with `with`
55
fun updateStoreStock(store: Store, extraShoes: Int, extraShirts: Int, extraJackets: Int) {
6-
// TODO: implement
6+
with(store) {
7+
shoes += extraShoes
8+
shirts += extraShirts
9+
jackets += extraJackets
10+
}
711
}
812
}

0 commit comments

Comments
 (0)