How can the posted code be compiled and executed for testing? It does not have a main() method.