Coding the Ball class