Question: Step 5 : Define a struct called Medicine with components name ( of type string ) , quantity ( of type int ) , and
Step : Define a struct called Medicine with components nameof type string quantityof type int and price of type double
Step : Define a class Pharmacy with private members numberOMediciens, a pointer of type Medicine cost of type double and the void function findCost The class has the public void member functions set void print a default parametrized constructor, and a copy constructor. The function set reads unknown medicine names, quantities, and prices from the text file "Pharmacy.txt using the while statement whileinFile
Use the following driver and "Pharmacytu"
Implement all member functions
Enforce the principle of least privileged.
tablePharmacytxttableSample OutputTotal cost of all medicines is tablePanadolDaivonexDermovateAugmentinBenylinTylenolOrofarAdoltable
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
