Question: 6.12.2 Write a python program using the following requirements: The human body has many organs. These organs have some properties in common and others

6.12.2 Write a python program using the following requirements: The human body has many organs. These organs 6.12.2 continued...  Create a Brain class as a child of the organ class o The brain is a vital organ in the

6.12.2 Write a python program using the following requirements: The human body has many organs. These organs have some properties in common and others that are specialized. Create an Organ class as a base class for specific organs o Attributes for the organ class are: organ_name o o organ_weight_grams is_transplantable organ_gender Required reserved methods for organ class: Constructor Create a Heart class as a child of the organ class is_vital_organ I organ_system Repr method that returns the attributes of organ instance The heart is a vital organ in the Muscular system Attributes for heart, defined in the constructor, are: heart_length_cm heart_weight_grams (use the parent class) heart_thickness_cm heart_breadth_cm o Required reserved methods for heart class: Constructor Repr method that returns the attributes of heart instance o Required general methods for heart class: heart_status-returns 'Pumping blood' heart_weight_oz-returns the heart weight in ounces 1 gram = 0.035 ounces 6.12.2 continued... Create a Brain class as a child of the organ class o The brain is a vital organ in the Nervous system Attributes for brain, defined in the constructor, are: brain_volume (in centimeters) o brain_weight_gram (use the parent class) o Required reserved methods for brain class: Constructor Repr method that returns the attributes of brain instance o Required general methods for brain class: brain_status-returns 'Thinking' brain_weight_oz-returns the brain weight in ounces 1 gram = 0.035 oz Include a unit test in an if_name__block to test the class. Use assert to check for errors. Unit Test Template: Instantiate the heart object with attributes 12, 280, 6.0, 9.0 Instantiate the brain object with attributes 1260, 1370.0 Test that all the parent and child attributes match what was instantiated Test that the general methods return the appropriate values

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the requirements given in the screenshots we need to create a Python program that defines a base class Organ for human organs and two child c... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!