Define a structure Student with a name and a vector<Course*> of courses. Define a structure Course with a name and a vector<Student*> of enrolled students. Then define these functions:
•void print_student(Student* s) that prints the name of a student and the names of all courses that the student takes.
•void print_course(Course* c) that prints the name of a course and the names of all students in that course.
•void enroll(Student* s, Course* c) that enrolls the given student in the given course, updating both vectors.
In your main function, define several students and courses, and enroll students in the courses. Then call print_student for all students and print_course for all courses.
1
Expert's answer
2018-05-30T19:01:17-0400
Dear Britt, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment