-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathInventory.java
More file actions
46 lines (39 loc) · 1003 Bytes
/
Inventory.java
File metadata and controls
46 lines (39 loc) · 1003 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
40
41
42
43
44
45
46
package com.dtcc.exams.collections;
import java.util.List;
import java.util.Map;
/**
* Use a map to keep track of inventory in a store
*/
public class Inventory {
/**
* @param strings list of strings to add / remove / fetch from
*/
public Map<String, Integer> Integer;
public Inventory(List<String> strings) {
// List<String> list = new List<String>();
}
/**
* nullary constructor initializes a new list
*/
public Inventory() {
}
/**
* @param item - increment the number of this item in stock by 1
*/
public void addItemToInventory(String item) {
return;
}
/**
* @param item - decrement the number of this item in stock by 1
*/
public void removeItemFromInventory(String item) {
return;
}
/**
* @param item - Search for this item in stock
* @return - return the number of items
*/
public Integer getItemQuantity(String item) {
return null;
}
}