Implemented the isEmpty, clear and add methods, including tests