main.cpp updated for class requirements.