Question: Java Programming #2 Pharmacy Order Create an abstract class named Pharmacy that has fields for customer name, the date, and prescription number and has a

Java Programming  Java Programming #2 Pharmacy Order Create an abstract class named Pharmacy

#2 Pharmacy Order Create an abstract class named Pharmacy that has fields for customer name, the date, and prescription number and has a constructor that accepts arguments for the three fields, as well as a toString method to display the information. Create three Drug classes that inherit from the Pharmacy class, all must have constructors that accept all values as arguments and also have a toString method that displays all of the Drug info: Antibiotic- must determine if pill form or liquid, and must be either Penicillin, Azithromycin, or Bactrim. Antihistamine-must determine if pill form or liquid, and must be either Cetirizine, Benadryl or Claritin Pain- must determine if pill form or liquid, and must be either Tylenol, Aleve, or Excedrin 1. 2. 3. Create a custom exception if the prescription number is less than 123457 or greater than 9876543 that alerts the pharmacist that the prescription number is a fraud. Write an application that creates 4 Pharmacy objects-1 of each type, as well as one that has an invalid prescription number. Point Value: 50 Points 20 points for correct use of abstract classes and inherited objects. 20 points for correct use of custom exceptions 10 points for professional code and output, including comments. I DO NOT WANT TO TYPE IN VALUES FOR THE PRESCRIPTIONS-YOU WILL RECEIVE O POINTS IF YOU ASK FOR USER INPUT! EXTRA CREDIT FOR EITHER PROGRAM (BUT NOT BOTH): 25 Points if you create the user interface using JavaFx- DO NOT import unnecessary classes, DO NOT include unnecessary controls MUST FUNCTION PROPERLY-NO PARTIAL EXTRA CREDIT

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!