Question: class Course: A University Course === Public Attributes === name: the name of the course students: a list of students enrolled in the course ===

 class Course: A University Course === Public Attributes === name: the

class Course: A University Course === Public Attributes === name: the name of the course students: a list of students enrolled in the course === Representation Invariants === - No two students in this course have the same id - name is not the empty string name: str students: List[Student] def __init__(self, name: str) -> None: Initialize a course with the name of . self.name = name self.students = [] def enroll_students(self, students: List[Student]) -> None: Enroll all students in in this course. If adding any student would violate a representation invariant, do not add any of the students in to the course. # TODO: complete the body of this method class Course: A University Course === Public Attributes === name: the name of the course students: a list of students enrolled in the course === Representation Invariants === - No two students in this course have the same id - name is not the empty string name: str students: List[Student] def __init__(self, name: str) -> None: Initialize a course with the name of . self.name = name self.students = [] def enroll_students(self, students: List[Student]) -> None: Enroll all students in in this course. If adding any student would violate a representation invariant, do not add any of the students in to the course. # TODO: complete the body of this method

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!