Need a help with this C++ exercise:
1. Create an empty c++ project and add a file with a main method.
2. Define a class Student with a name and a course* which will point to an array of course objects in which the
student is enrolled.
3. Define a class Course with a name and a student* which will point to an array of enrolled students.
4. For your classes make sure you implement the < operator as required, as well as the destructor to clean up
memory, and the stream insertion operator.
5. Define these functions outside of either class in a separate header file:
6. void print_student(const Student* student, std::ostream& out = std::cout) that prints the name of a student and
the names of all courses in which the student is enrolled. You should send the objects to the out using the
insertion operator.
7. void print_course(const Course* course, std::ostream& out = std::cout) that prints the name of a course and the
names of all students in that course using a similar behaviour as the method above.
8. c. void enroll(const Student* student, const Course* course) that enrolls the given student in the given course,
updating both arrays.
Main method:
int main()
{
auto* c1 = graduate::create_course("CS 2133");
auto* c2 = graduate::create_course("CS 4983");
auto* s1 = graduate::create_student("John", "Cramer");
auto* s2 = graduate::create_student("Jayson", "Miller");
auto* s3 = graduate::create_student("Jenny", "Liu");
graduate::enroll(s1, c1);
graduate::enroll(s2, c1);
graduate::enroll(s3, c1);
graduate::enroll(s2, c2);
graduate::enroll(s3, c2);
graduate::print_course(c1);
graduate::print_course(c2);
graduate::print_student(s1);
graduate::print_student(s2);
graduate::print_student(s2);
delete c1;
delete c2;
delete s1;
delete s2;
delete s3;
return 0;
}