#include
#include
class hospital
{
char name[20];
char address[40];
int age;
char join[20];
char toi[50];
public:
void read()
{
cout<<"ENTER THE DETAILS\n";
cout<<"ENTER NAME,ADDRESS,AGE,ILLNESS,JOINING_DATE\n";
cin>>name>>address>>age>>toi>>join;
}
void write()
{
cout<<" NAME :"<
};
class p_details: public hospital
{
int wardno,bedno;
char dod[20];
public:
void accept()
{
cout<<"ENTER WARDNUMBER,BEDNO,DATE OF DISCHARGE\n";
cin>>wardno>>bedno>>dod;
}
void display()
{
cout<<"WARDNUMBER :"<
};
void main()
{
clrscr();
p_details x;
x.read();
x.accept();
cout<
x.display();
getch();
}
OUTPUT:
ENTER THE DETAILS
ENTER NAME,ADDRESS,AGE,ILLNESS,JOINING_DATE
sanjay
hno389,stno5,hyd
30
tuberculosis
4thjan2004
ENTER WARDNUMBER,BEDNO,DATE OF DISCHARGE
30
10
5thfeb2004
NAME :sanjay
ADDRESS :hno389,stno5,hyd
AGE :30
ILLNESS :tuberculosis
JOINING DATE :4thjan2004
WARDNUMBER :30
BED NUMBER :10
DATE OF DISCHARGE :5thfeb2004
No comments:
Post a Comment