#include<iostream>
using namespace std;
class publication{
int price;
char title[20];
public:
void get(){
cout<<"enter title:";
cin>>title;
cout<<"enter price:";
cin>>price;
}
void put(){
cout<<"title is:"<<title<<endl;
cout<<"price is:"<<price<<endl;
}
};
class book:public publication{
int p_cnt;
public:
void getb(){
try
{
get();
cout<<"enter the page count:";
cin>>p_cnt;
if (p_cnt==0){
throw p_cnt;
}
}
catch(...){
cout<<"invalid page count:"<<endl;
p_cnt=0;
}
}
void putb(){
cout<<"page count is:"<<p_cnt<<endl;
}
};
class tape:public publication{
float p_time;
public:
void getp(){
cout<<"Enter the play time:";
cin>>p_time;
}
void putp(){
cout<<"play time is:"<<p_time<<endl;
}
};
int main(){
book b;
tape t;
cout<<"SHRUTI KIRAN JADE"<<endl;
[Link]();
[Link]();
[Link]();
[Link]();
return 0;