Question: In java please The objective is to better understand how objects of various classes can be made to interact. Create a program that models writing
In java please
The objective is to better understand how objects of various classes can be made to interact.



Create a program that models writing a prescription, filling it at a pharmacy and using up all the doses of medicine. No user input is required. Implementation Your implementation should follow the provided JavaDoc and the UML below. Each class should have a functioning toString method and this should be used to generate some of the output. Pharmacy Application franchise: String fill: int main(arguments String) void Pharmacy(franchise String) fill(franchise Prescription) Bottle toString): String Bottle Prescription drug : String amount: int drug : String amount int Bottle(drug: String,amount: int) take) void isEmpty): boolean Prescription(drug: String,amount: int) drug): String amount): int toString00: String toString: String Sample Output Writing prescription. A prescription for 20 tablets of Azithromycin. Filling prescription. A bottle of Azithromycin containing 20 tablets Taking drug. Taking a dose. Taking a dose. Taking a dose. Taking a dose. Taking a dose. Taking a dose Taking a dose. Taking a dose. Taking a dose
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
