Implement the numberInStock method. This should locate a product in the collection with a matching ID and return the current quantity of that product as a method result. If no product with a matching ID is found, return zero. This is relatively simple to implement once the findProduct method has been completed. For instance, numberInStock can call the findProduct method to do the searching and then call the getQuantity method on the result. Take care over products that cannot be found, though.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.