Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSE_120 Sir_it_is_urgent.do_fast._Please_solve_this_code_in_python3_paste_with_proper_intendent_blocks_bypressing(CTRL+SHIFT+V),Also_please_provide_code_screenshot,_Thank_you. Do_not_need_comments. Just_give_me_solution_as_fast_as_possible._I_am_running_out_of_time._Attach_a_screenshot_with_yoursolve. Question: 3 Implement the design of the Doctor and Engineer class derived from Person class so that the following code generates

CSE_120

Sir_it_is_urgent.do_fast._Please_solve_this_code_in_python3_paste_with_proper_intendent_blocks_bypressing(CTRL+SHIFT+V),Also_please_provide_code_screenshot,_Thank_you.

Do_not_need_comments. Just_give_me_solution_as_fast_as_possible._I_am_running_out_of_time._Attach_a_screenshot_with_yoursolve.

Question: 3 Implement the design of the Doctor and Engineer class derived from Person class so that the following code generates the output below:

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

def __str__(self): s = f"Name: {self.name} Contact: {self.contact}" return s #Write your code here

d = Doctor("Dr Strange", "4585632", "Neurosurgery", "DMC") d.add_patients("Dhaka Abdur Rahim", "Dhaka John Cena", "Narayanganj John Wick", "Comilla CM Punk") print("1.=========================================================") print(d) print("2.=========================================================") d.show_patient_list("Dhaka") print("3.=========================================================") d.show_patient_list("Rajshahi") print("4.=========================================================") d.add_patients("Narayanganj Naruto Uzumaki") print("5.=========================================================") print(d) print("6.=========================================================") eng = Engineer("Howard Wolowitz", "982685", "Mechanical") eng.add_projects("Mongol Tori Bangladesh", "Duburi Bangladesh", "Curiosity Rover USA", "Perseverence USA") print("7.=========================================================") print(eng)

OUTPUT: 1.========================================================= Doctor Details: Name: Dr Strange Contact: 4585632 Speciality: Neurosurgery Hospital: DMC Patients List: {'Dhaka': ['Dhaka Abdur Rahim', 'Dhaka John Cena'], 'Narayanganj': ['Narayanganj John Wick'], 'Comilla': ['Comilla CM Punk']} 2.========================================================= Patients from Dhaka: Dhaka Abdur Rahim Dhaka John Cena 3.========================================================= Dr Strange has not patients from Rajshahi 4.========================================================= 5.========================================================= Doctor Details: Name: Dr Strange Contact: 4585632 Speciality: Neurosurgery Hospital: DMC Patients List: {'Dhaka': ['Dhaka Abdur Rahim', 'Dhaka John Cena'], 'Narayanganj': ['Narayanganj John Wick', 'Narayanganj Naruto Uzumaki'], 'Comilla': ['Comilla CM Punk']} 6.========================================================= 7.========================================================= Engineer Details: Name: Howard Wolowitz Contact: 982685 Field: Mechanical Project List: {'Bangladesh': ['Mongol Tori Bangladesh', 'Duburi Bangladesh'], 'USA': ['Curiosity Rover USA', 'Perseverence USA']}

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

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

ISBN: 0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago