Is it more strange than the fact that that GradeBook is about course "David J. Malan"?
Your "display gradebooks member function" does not treat all books equally:
1 2
|
cout << "GradeBook1's initial courseName is: " << gradeBook1.getCourseName() << '\n';
cout << "Instructors Name: " << gradeInstructor.getInstructorsName() << '\n';
|
IMHO, it should:
1 2 3 4
|
cout << "GradeBook1's initial courseName is: " << gradeBook1.getCourseName()
<< " and Instructors Name: " << gradeBook1.getInstructorsName() << '\n';
cout << "GradeInstrutor's initial courseName is: " << gradeInstructor.getCourseName()
<< " and Instructors Name: " << gradeInstructor.getInstructorsName() << '\n';
|
This is a question about logic. All gradebooks should be gradebooks and therefore used as gradebooks.
Is the instructor a gradebook? Can instructor's name be used as a course?
(I would not be surprised, if
GradeBook maybe("Trump", "Trump");
but I digress.)
If every gradebook names an instructor, why do you show her name from one book only (but don't show the name of the course of that book)?
Different identifier? Do you mean "value" when you say "identifier"?
The x and y are separate integers. It is ok that they have same value.
Similarly, one could have GradeBooks with identical value.
However, the logic of the problem that you are solving might say that each book must be unique. That is a property of the problem, not of the programming language.