#include "stdafx.h" #include<string> #include<iostream> using namespace std; class date { private: int day; int month; int year; public: date(int d=0 ,int m=0,int y=0) { day=d; month=m; year=y; cout<<"constructor of date funtion"<<endl; } ~date() { cout<<"destructor of date funtion"<<endl; } int get_d_d() { return day; } int get_d_m() { return month; } int get_d_y() { return year; } void set_day(int dd) { day=dd; } void set_month(int mm) { month=mm; } void set_year(int yy) { year=yy; } void invalid_date(int day,int month,int year) { cout<<"enter the date"<<endl; cin>>day; cout<<endl; cout<<"The month is:"<<endl; cin>>month; if(month==1) { cout<<"January"<<endl; } if(month==2) { cout<<"FEBUARY"<<endl; } if(month==3) { cout<<"MARCH"<<endl; } if(month==4) { cout<<"APRIL"<<endl; } if(month==5) { cout<<"MAY"<<endl; } if(month==6) { cout<<"June"<<endl; } if(month==7) { cout<<"JULY"<<endl; } if(month==8) { cout<<"AUGUST"<<endl; } if(month==9) { cout<<"SEPTEMBER"<<endl; } if(month==10) { cout<<"OCTOBER"<<endl; } if(month==11) { cout<<"NOVEMBER"<<endl; } if(month==12) { cout<<"DECEMBER"<<endl; } else { cout<<"invalid month"; } cout<<"enter a year.......!!!!"<<endl; cin>>year; if(year>2000 && year<2050) { cout<<"valid....year"; } } }; class person { private: string fname; string lname; public: person(string f ,string l) { fname=f; lname=l; cout<<"constructor of person funtion"<<endl; } person() { cout<<"destructor of person funtion"<<endl; } string get_p_f() { return fname; } string get_p_l() { return lname; } void set_fname(string f) { fname=f; } void set_lname(string l) { lname=l; } void valid_alphabet() { if((fname>=65 && fname<=90)&&(fname>=97 && fname <=122)) { cout<<"first name alphates....!!!!"<<fname<<endl; } } else if((lname>=65 && lname<=90)&&(lname>=97 && lname<=122)) { cout<<"last name alphabets....."<<lname<<endl; } else { cout<<"invalid alphabetss....."endl; } }; class doctor : public person { private: string doc_spc; public: doctor(string doc="\0") { doc_spc=doc; cout<<"constructor in doctor"<<endl; } ~doctor() { cout<<"desstructor in doctor"<<endl; } string get_specialist() { return doc_spc; } void set_specialist(string doc) { doc_spc=doc; } }; class bill { private: int patient_id; int total_charges; int doc_fees; int medicine_fees; int room_charges; public: bill(int a,int b,int c,int d,int f) { patient_id=a; total_charges=b; doc_fees=c; medicine_fees=d; room_charges=f; cout<<"constructor in bill"<<endl; } ~bill() { cout<<"Destructor in bill"<<endl; } int get_bill_p_id() { return patient_id; } int get_bill_t_charges() { return total_charges; } int get_bill_doc_fees() { return doc_fees; } int get_bill_mdcn_chrges() { return medicine_fees; } int get_bill_room_charges() { return room_charges; } void set_pa_id(int a) { patient_id=a; } void set_t_charges(int b) { total_charges=b; } void set_doc_fees(int c) { doc_fees=c; } void set_mdcn(int d) { medicine_fees=d; } void set_room(int f) { room_charges=f; } }; class patient:public person { private: int patient_id; int age; int dob; string physician_name; int date_entr_patient; int date_patient_discharged; public: patient(int rl,int ag,int birth,string d_name,int date_patient,int dis_date) { patient_id=rl; age=ag; dob=birth; string physician_name=d_name; date_entr_patient=date_patient; date_patient_discharged=dis_date; } ~patient() { cout<<"distructor in pateint"<<endl; } int get_pat_id() { return patient_id; } int get_age() { return age; } int get_birth() { return dob; } string get_physian_name() { return physician_name; } int get_date_enter_patient() { return date_entr_patient; } int get_date_patient_discharged() { return date_patient_discharged; } void set_pat_id(int rl) { patient_id=rl; } void set_age(int a) { age=a; } void set_birth(int b) { dob=b; } void set_physian_name(int n) { physician_name=n; } void set_date_entr_patienr(int ed) { date_entr_patient=ed; } void set_date_entr_patienr(int dd) { date_patient_discharged=dd; } }; int main() { cout<<"enter docter new entries..!!!"; cout<<"enter patient new entries..!!!"; return 0; }
C++ Hospital Biling System Project
Post A Comment:
0 comments: