Your biggest mistake is not toe
Learn C++ and understand the details of your task. The next is to read the assigment like the
fineprint.
You need to implement each detail one after the other and so find the solution.
tip: make more output and less input amd print calculation details
"Enter m1: " >> cout;
cin >> m1;
ps: the student class must be abstract