Task 4
Task 4
#include<string.h>
class Book{
string author;
string title;
string publisher;
int price;
int stock_position;
public :
Book(){
for(int i=0;i<1;i++){
cout<<"Enter the author Name : ";
cin>>author;
fflush(stdin);
cout<<"Enter the title : ";
cin>>title;
fflush(stdin);
cout<<"Enter the publisher : ";
cin>>publisher;
fflush(stdin);
cout<<"Enter the price of the book : ";
cin>>price;
fflush(stdin);
cout<<"Enter the Number of Books present in Store : ";
cin>>stock_position;
fflush(stdin);
cout<<"________________________________________________________-"<<endl;
}
}
int checklist(string a){
int qu;
for(int i=0;i<3;i++){
if(title == a){
int main(){
Book b[3];
string a;
cout<<"Enter the Title of the Book : ";
cin>>a;
b[1].checklist(a);
b[2].checklist(a);
b[3].checklist(a);
}