refactored the code into main.cpp, Billiard.h/cpp, Table.h/cpp, and Ball.h/cpp