Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write your answers with your explanations. Thank you! There are two parts on here. Given the following code class PersonClass (object) def _init_ _(self,
Please write your answers with your explanations. Thank you!
There are two parts on here.
Given the following code class PersonClass (object) def _init_ _(self, name-'", address''): self.name-name self.address- address def str_(self): return "Name: (" . format (self.name) Write only the code requested for the following classes. Define a new child class of PersonClass called Doctor. Write the header ( declaration of the class) 3 Points) Write the initializer for the Doctor class. It should have the same parameters as the PersonClass, plus two additional parameters; specialty a string that should default to General Practitioner"', and salary a float that defaults to 90,000. In the initializer you should call the constructor for PersonClass passing in the correct values and should then set the additional parameters passed. (7 Points)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started