Question: Implement a student class that inherits from the person class you just implemented. A student should have the following attributes: Student ID: Integer Major: String

Implement a student class that inherits from the person class you just implemented. A student should have the following attributes: Student ID: Integer Major: String Courses Completed: List . The constructor will receive the name, birth of date, the student ID and the major. The list of completed courses should be initialized as an list. Make the ID attribute private and the list of completed courses and the major should be public; create a getter for the ID. Write a __str_method that adds to the print of the person class the ID of the student; do so by calling the _str_method of the person class (check the testcase for the format). For example: Test Result birth = datetime.datetime (1990, 5, 17) 213498 susan = Student("Susan", birth, 213498, "CS") CS print(susan.get_student_id()) print(susan.major) Name: Susan, Age: 31, Student ID: 213498 birth = datetime.datetime (1990, 5, 17) susan = Student("Susan", birth, 213498, "CS") print(susan)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
