Assignment 3 for OOP in C++