We wrote the methods hasElements and toString. We have also added comments to help make our code easier to read.