mplement the design of the Student_Tutor class that inherit from Student  class so that the following code generates the output below: Hint: Each room has a capacity of 2 Student tutors.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Implement the design of the Student_Tutor class that inherit from Student 
class so that the following code generates the output below:

Hint: Each room has a capacity of 2 Student tutors.

class Student:
     def __init__(self,name,student_id):
         self.name = name
         self.student_id = student_id
         self.semester = "Spring 2022"


     def details(self):
         print("Name:",self.name)
         print("Student_ID:",self.student_id)
         print("Current Semester:",self.semester)


# Write your code here:
STs = []
S1 = Student("Reem", 18101235)
S1.details()
print("1.======================================")
ST1 = Student_Tutor("Moynul", 16107892, 35, "CSE110", "CSE111")
ST2 = Student_Tutor("Priyo", 16107792, 25,"CSE320")
ST3 = Student_Tutor("Ronok", 18207892, 
36, "CSE110", "CSE111", "CSE221", "CSE220")
ST4 = Student_Tutor("Zeba", 19307892, 48, "CSE110")
STs.extend([ST1, ST2, ST3, ST4])
print("2.======================================")
for i in range(len(STs)):
     STs[i].details()
     print(f"{i+3}.======================================")
print("Number of Student Tutors:",Student_Tutor.student_tutors)

OUTPUT:
Name: Reem
Student_ID: 18101235
Current Semester: Spring 2022
1.=====================================
2.=====================================
Student Tutor's Details:
Name: Moynul
Student_ID: 16107892
Current Semester: Spring 2022
Tutor_ID: 35
Courses: CSE110, CSE111
You'll find Moynul in room no. 1 during the consultation hours.
3.======================================
Student Tutor's Details:
Name: Priyo
Student_ID: 16107792
Current Semester: Spring 2022
Tutor_ID: 25
Courses: CSE320
You'll find Priyo in room no.1 during the consultation hours.
4.======================================
Student Tutor's Details:
Name: Ronok
Student_ID: 18207892
Current Semester: Spring 2022
Tutor_ID: 36
Courses: CSE110, CSE111, CSE221, CSE220
You'll find Ronok in room no. 2  during the consultation hours.
5.======================================
Student Tutor's Details:
Name: Zeba
Student_ID: 19307892
Current Semester: Spring 2022
Tutor_ID: 48
Courses: CSE110
You'll find Zeba in room no. 2 during the consultation hours.
6.======================================
Number of Student Tutors: 4

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education