Implemented isFull and isEmpty functions.