MCPcopy Create free account
hub / github.com/InterviewReady/Low-Level-Design / User

Class User

InventorySystem.java:94–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94class User {
95 public void addProduct(){
96 InventorySystem.addProduct(new Product("", 0d,"",0,Size.L));
97 }
98
99 public void executeOrder(Order order){
100 for(Map.Entry<Product, Integer> item: order.productCount.entrySet()) {
101 for (int i = 0; i < item.getValue(); i++) {
102 InventorySystem.removeUnit(item.getKey());
103 }
104 }
105 }
106}
107
108class Order {
109 Map<Product, Integer> productCount = new HashMap<>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected