Write a main function that does the followings:
--- Create an empty vector of Student class (see code below).
--- Add 4 Student objects to the vector using the push_back() method.
--- Use a loop to show GPAs of 4 objects.
--- Insert a new Student object in the middle of the vector.
--- Use a loop to show GPAs of 5 objects
class Student
{
protected:
int ID;
float mathScore;
float chemScore;
public:
Student (int = 0, float = 0.0f, float = 0.0f);
void getGPA();
};
Please note, that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.
We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
You have a rather clear list of things that have to be within main().