Assignment 2 for OOP in C++