Created
April 10, 2018 13:03
-
-
Save MuddyBootsCode/1c7392ebdfa91503200b72ce435c0602 to your computer and use it in GitHub Desktop.
pharmacy class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<string> | |
include "Pharmacy.h" | |
using namespace std; | |
double values[] = { 23.45, 45.67, 125.00, 567.98, 2.00 }; | |
Pharmacy::Pharmacy(int choice) { | |
switch (choice) { | |
case 1: | |
Pharmacy.setValue(values[0]); | |
cout << "A charge of $" << values[0] << "for antibiotics was added to the patient account." << endl; | |
value = values[0]; | |
break; | |
} | |
case 2: | |
Pharmacy.setValue(values[1]); | |
cout << "A charge of $" << values[1] << "for anti-inflamitories was added to the patient account." << endl; | |
value = values[1]; | |
break; | |
} | |
case 3: | |
Pharmacy.setValue(values[2]); | |
cout << "A charge of $" << values[2] << "for seizure medication was added to the patient account." << endl; | |
value = values[2]; | |
break; | |
} | |
case 4: | |
Pharmacy.setValue(values[3]); | |
cout << "A charge of $" << values[3] << "for chemotherapy meds was added to the patient account." << endl; | |
value = values[3]; | |
break; | |
} | |
case 5: | |
Pharmacy.setValue(values[4]); | |
cout << "A charge of $" << values[4] << "for ibuprofen was added to the patient account." << endl; | |
value = values[4]; | |
break; | |
} | |
} | |
double Pharmacy::getValue() { | |
return value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment