Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement the design of the Student_T class that inherit from Student class so that the following code generates the output below: Hint: Each room has

Implement the design of the Student_T class that inherit from Student class so that the following code generates the output below: Hint: Each room has a capacity of 2 Student T. 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_T("Moynul", 16107892, 35, "CSE110", "CSE111") ST2 = Student_T("Priyo", 16107792, 25,"CSE320") ST3 = Student_T("Ronok", 18207892, 36, "CSE110", "CSE111", "CSE221", "CSE220") ST4 = Student_T("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 T:",Student_T.student_t) OUTPUT: Name: Reem Student_ID: 18101235 Current Semester: Spring 2022 1.===================================== 2.===================================== Student T'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 T's Details: Name: Priyo Student_ID: 16107792 Current Semester: Spring 2022 T_ID: 25 Courses: CSE320 You'll find Priyo in room no.1 during the consultation hours. 4.====================================== Student T's Details: Name: Ronok Student_ID: 18207892 Current Semester: Spring 2022 T_ID: 36 Courses: CSE110, CSE111, CSE221, CSE220 You'll find Ronok in room no. 2 during the consultation hours. 5.====================================== Student T's Details: Name: Zeba Student_ID: 19307892 Current Semester: Spring 2022 T_ID: 48 Courses: CSE110 You'll find Zeba in room no. 2 during the consultation hours. 6.====================================== Number of Student T: 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

help asp

Answered: 1 week ago