Implemented the CommandPrompt class