Question: java Your vets office is using the Pet class defined in Display 4.15 and would like to include a way to calculate the dosage amount

java

Your vets office is using the Pet class defined in Display 4.15 and would like to include a way to calculate the dosage amount for drugs that are commonly administered for dogs and cats. Make the following modifications to the class:

Add an instance variable that indicates if the type of the pet is a dog or a cat.

Modify the constructor and the set method to include the type of pet (i.e., dog or cat).

Add a method named that returns as a double the dosage in ml for the sedative acepromazine.

Add a method named that returns as a double the dosage in ml for the pain killer carprofen.

The dosage calculation is

is in pounds.

For acepromazine, use mg per , and mg per for dogs and for cats.

For carprofen, use mg per , and mg per for dogs and for cats.

Modify the main method in Display 4.16 to include tests of the new methods.

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!