Formulatrix Interview Question

For this existing code, how to add new classes to existing code without having to change the main code?