Question: write java program question num 11 CHAPTER 4 Defining Classes I . Add a method named acepromazine ( ) that returns as a double the

write java program question num 11
CHAPTER 4 Defining Classes I . Add a method named acepromazine ( ) that returns as a double the in ml for the sedative acepromazine. Add a method named carprofen() that returns as a double the ml for the pain killer carprofen. . The dosage calculation is Weight mg per kg Dosage(ml) = mg per mi Weight is in pounds. For acepromazine, use mg per ml - 10, and mg per kg - 0.03 for 0.002 for cats. dogs and For carprofen, use mg per ml-12, and mg per ky-0.5 for dogs and 0.25 for can. Modify the main method in Display 4.16 to include tests of the new methods. 11. Create a class named Pizza that stores information about a single pizza. I should contain the following: Private instance variables to store the size of the pizza (either small, medium or large), the number of cheese toppings, the number of pepperoni toppings. and the number of ham toppings. Constructor(s) that set all of the instance variables Public methods to get and set the instance variables. public method named calccost (that returns a double that is the cost of the pizza. Pizza cost is determined by: Small: $10 $2 per topping Medium: $12+ $2 per topping Large: $14 $2 per topping . A public method named getDescription() that returns a String o ing the pizza size, quantity of each topping, and the pizza cost as calculatod by calccost () Write test code to create several pizzas and output their descriptions. For example, a large pizza with one cheese, one pepperoni and two ham toppings should cost a total of $22. 2. This programming project extends Programming Project 4.11. Create a piazaorde saved should be class that allows up to three pizzas to be saved in an order. Each pizza a Pizza object as described in Programming Project 4.11. In addition to appropriate instance variables and constructors, add the following methods: ts the number of pizzas public void setNumPizzas (int numPizzas)-sets Lo order numPizzas must he hetween 1 and 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
