Having Trouble with Container Class
I have an assignment to make a gradebook. We've done the assignment a few times prior, using different methods; once in C with just arrays, once in C with structs, and now we are to do it in C++.
I've written a class for the student, one for the course, and one for the enrollment. We are supposed to use container classes (which the professor once also referred to as a collection class, if that helps). The way I understand it is that they work kind of like an array of objects.
Below you will find my class for a student, and my horrid attempt at a container class. I feel like we haven't covered this in the actual class I'm taking, so it's hard to wrap my head around it. I've tried quite a few things so far.
I would appreciate any help to get me on the right track. All the websites I've went to seem to be doing something totally different, or doing something that doesn't seem applicable.
Code:
class student
{
public:
long int studentID;
int courseCounter;
string firstName;
string lastName;
student();
void addFirst(string);
void addLast(string);
};
Code:
class students
{
student studentsCOL[100];
students();
void addStudent(string, string, long int, int);
};