#include <iostream>
using namespace std;
class publiction {
protected:
string title;
float price;
public:
publiction(string n, float p) {
title = n;
price = p;
}
};
class Book : public publiction {
protected:
int pageCount;
public:
Book(string n, float pri, int page) : publiction(n, pri) {
pageCount = page;
}
void display() {
cout << "The Title Of Book Is " << title << endl;
cout << "The Price Of Book = " << price << "$" << endl;
cout << "The Number Of Page = " << pageCount << endl;
}
};
class Tape : public publiction {
protected:
float time;
public:
Tape(string n, float p, float m) : publiction(n, p) {
time = m;
}
void displaytime() {
cout << "The Time You Need = " << time << " Minutes" << endl;
}
};
int main() {
string n;
float a, b;
int x;
cout << "Enter The Title" << endl;
cin >> n;
cout << "Enter The Price" << endl;
cin >> a;
cout << "Enter The Time" << endl;
cin >> b;
cout << "Enter The Number Of Page " << endl;
cin >> x;
Book obj(n, a, x);
Tape g(n, a, b);
obj.display();
g.displaytime();
return 0;
}