Assume there is the Fridge class. It contains the following member functions:
open(): Unitopens the fridge.find(productName: String): Productreturns a product by its name.close(): Unitcloses the fridge.
Implement Fridge.take(productName: String): Product. It opens the fridge, finds the product, closes the fridge and returns the found product.