Implement the design of the Teacher class that inherit from Person class so  that the following code generates the output below:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

need it urgently, please

#python code

Implement the design of the Teacher class that inherit from Person class so 
that the following code generates the output below:

Hint: Each office room has a capacity of 2.

class Person:
     def __init__(self,name, nid):
         self.name = name
         self.nid = nid

     def info(self):
         print("Name:",self.name)
         print("NID:",self.student_id)

# Write your code here:
Teachers = []
P1 = Person("Fariha", 1357924680)
P1.info()
print("1.======================================")
T1 = Teacher("Sabur",8346349712, 3515, "Math", "Physics")
T2 = Teacher("Hamid", 8423657216, 9523,"Economics")
T3 = Teacher("Rufaidah", 3578951236, 
7236, "Math","Chemistry", "Biology", "Physics")
T4 = Teacher("Rimon", 1930667892, 4228, "Physics")
Teachers.extend([T1, T2, T3, T4])
print("2.======================================")
for i in range(len(Teachers)):
     Teachers[i].info()
     print(f"{i+3}.======================================")
print("Number of Teachers:", Teacher.teachers)

OUTPUT:
Name: Fariha
NID: 1357924680
1.======================================
2.======================================
Teacher's Details:
Name: Sabur
NID: 8346349712
Employee_ID: 3515
Subjects: Math, Physics
Sabur will sit in office room no. 1.
3.======================================
Teacher's Details:
Name: Hamid
NID: 8423657216
Employes_ID: 9523
Courses: Economics
Hamid will sit in office room no. 1.
4.======================================
Teacher's Details:
Name: Rufaidah
NID: 3578951236
Employee_ID: 7236
Subjects: Math, Chemistry, Biology, Physics
Rufaidah will sit in office room no. 2.
5.======================================
Teacher's Details:
Name: Rimon
NID: 1930667892
Employee_ID: 4228
Subjects: Physics
Rimon will sit in office room no. 2..
6.======================================
Number of Teachers who joined: 4

 
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY