Using the Bat class and coding the main function