it is a question on classes in order to get total charge of syrgery done medication taken, daily rate fee of hospital and then at last calculating the total charge of a patient.
i cannot complete the main program. the total charge is not being displayed. if i could get the correct code for the main program.
// account class//
class patientaccount{
float TotalCharge,daily_rate;
int Days;
#include "pharmacy.h"
#include <iostream>
using namespace std;
{
pharmacy::pharmacy(){
medication1(panadol)=100;//Values are random can be change
medication2(piriton)=200;
medication3(maxilase)=300;
medication4(novagesic-flu)=400;
medication5(zecid)=500;
}
int main()
{
float surgery, medication,Total_Charge;
int daily_rate, Days;
cout<<"Please choose a surgery from the given list below"<<endl;
cout<<"1. \t Surgery1"<<endl;
cout<<"2. \t Surgery2 "<<endl;
cout<<"3. \t Surgery2 "<<endl;
cout<<"4. \t Surgery2"<<endl;
cin>>surgery;
switch(surgery)
{
case(1):
{
cout<<" surgery cost is 15000 "<<endl;
return 0;
}
case(2):
{
cout<<" surgery cost is 20000 "<<endl;
return 0;
}
case(3):
{
cout<<" surgery cost is 25000 "<<endl;
return 0;
}
case(4):
{
cout<< "surgery cost is 35000 "<<endl;
return 0;
}
case(5):
{
cout<< "surgery cost is 50000 "<<endl;
return 0;
}
cout<<"therefore cost of surgery and medicines make upto: " <<endl;
cout<<"adding to that the daily rate, all make up to: " <<endl;
cout<< "the patient is checked out " <<endl;
Total_Charge=(days*(daily_rate))+surgery price+(list of medication total price)
cout<< "thus making all the total charge is : " << total_Charge<<endl;