26. Degsign two base personnel(name, address,e-mail-id,birthdate)and academic (marks in 10th and 12th,class obtain) derive a class biodata from both these class.write a c++ program to prepare a biodata of a student having a personal information and academic information.


#include<iostream.h>
#include<conio.h>
class personnel
{
public:
char name[20],addr[20], email[20];
char birth_date[10];
public:
void get()
{
cout<<“enter the name,addr,email,birth date”;
cin>>name>>addr>>email>>birth_date;
}
void put()
{
cout<<“\n\n name:- “<<name;
cout<<“\n\n address:-“<<addr;
cout<<“\n\n email id:-“<<email;
cout<<“\n\n birth date:-“<<birth_date;
}

};
class academic
{
public:
float mark_10,mark_12;
public:
void accept()
{
cout<<“\n\n enter the 10th & 12th mark”;
cin>>mark_10>>mark_12;
}
void show()
{
cout<<“\n\n mark in 10th”<<mark_10;
cout<<“\n\n mark in 12th”<<mark_12;
}
};
class biodata:personnel,academic
{
public:
void acc1()
{
get();
accept();
}
void put1()
{
cout<<“\n\n\n ————–BIODATA————–“;
put();
show();
}
};

void main()
{
biodata b;
clrscr();
b.acc1();
b.put1();
getch();
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s