Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

I need help with solving 2 9 - 3 8 in the general ledger.

Answered: 1 week ago