Question: Create the code needed to create a container class called 'Course' that is meant to be a container for Student class objects. Define the Course
Create the code needed to create a container class called 'Course' that is meant to be a container for Student class objects. Define the Course class to have attributes of a course: name, number, and section egIT Include the structure needed to hold Student objects and a method called 'addStudent' that takes in a Student object id and adds it to the internal structure if the object id is the correct type and is not already in the structure.
The Student class definition used to create Student objects this is provided, do not recode it in your answer:
class Student:
def initself name, gnum, major:
self.name name
self.gnum gnum
self.major major
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
