Object-Oriented Programming · Airbnb · Medium
Requirements Begin with one or more boxes that are already open; other boxes may require keys. Every box holds a quantity of candies, zero or more keys for particular boxes, and zero or more child boxes. A box may be opened only when it is initially open or its key has been obtained. Compute the total number of candies that can be collected by continuing through every box that eventually becomes openable. Represent the domain explicitly. The design should include a Box class…
Checking your access…