Question: Write a class Store which includes the attributes: store name, city. Write another class encapsulating a Pharmacy, which inherits from Store. A Pharmacy has the

Write a class Store which includes the attributes: store name, city. Write another class encapsulating a Pharmacy, which inherits from Store. A Pharmacy has the following additional attributes: how many prescriptions are filled each week and the number of pharmacy patients.

Code the constructor, accessors, mutators, toString and equals method of the super class Store. Code the constructor, accessors and mutators for the subclass Pharmacy. In the Pharmacy class, also code a method returning the average number of prescriptions per patient for a week.

You should create a test class which creates 2 Pharmacy objects, then call your set methods, get methods, toString and equals methods and method to calculate the average number of prescriptions per patient for the Pharmacy objects.

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!