University Assignment in C++