There is a class called Box, which can be defined as a container for storing different things. But as we all know, pets prefer using boxes for other purposes: playing, sleeping, hiding in them, etc.
Complete the Box class so that it could be applied only to objects of subclasses of the Animal class. Inside this class, just declare the add(object) which accepts an object of Animal or its subclass as an argument. Keep in mind that Box can also be empty.