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 (e.g.'IT-209-001'). 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 __init__(self, name, g_num, major):
self.name = name
self.g_num = g_num
self.major = major

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!