Question: using python 4. Using the diagram as a reference, implement the following classes: Drug Painkiller Antibiotic Type The Drug class should have the following attributes:

using python
using python 4. Using the diagram as a reference, implement the following

4. Using the diagram as a reference, implement the following classes: Drug Painkiller Antibiotic Type The Drug class should have the following attributes: Attribute name manufacturing_date expiration_date company name category dosage (mg) side_effect String String String String String Integer String The class should also include the appropriate constructor and string methods to initialize and print the contents of each Drug instance, as well as accessor and mutator methods for each attribute. Add an attribute called contra_indications to the Painkiller class that inherits from Drug. This field is of type String. and holds the drugs that may conflict with the painkiller instance. As for the Antibiotic class, add an attribute called dosage_time of type int. You should override the __init__and_str_methods and add the appropriate accessors and mutators in Painkiller and Antibiotic classes in order to account for the new attributes. Create a test class to test all the above classes. Print all content of the variables using the _str_methods. wire wrather the status de More mette an er. I den nye etme ne ym. The map 31 Tetor, 11 pretendime meting medias

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!