#include<iostream>
#include<conio.h>
Using namespace std;
class book
int book_ID;
float price;
string title;
string author;
public:
book()
book_ID=0;
price=0.0;
title="";
author="";
void SetBookId()
cin>>book_ID;
void setTitle()
[Link]();
getline(cin,title);
void setjun()
cin>>author;
}
void setPrice()
cin>>price;
int Getbook_ID()
return book_ID;
string GetTitle()
return title;
string Getjun()
return author;
float getprice()
return price;
void setter()
cout<<"\n Enter book's details.";
cout<<"\n...";
cout<<"\n Book id:";
this -> SetBookId();
cout<<"\n Book Title:";
this -> setTitle();
cout<<"\n Author:";
this -> setjun();
cout<<"\n Book price:";
this -> setPrice();
cout<<"\n Book has been added";
void getter()
cout<<"\n\n-------------------------------------";
cout<<"\n Book ID: "<<Getbook_ID();
cout<<"\n Book Title: "<<GetTitle();
cout<<"\n Author: "<<Getjun();
cout<<"\n Book Price: "<<getprice();
cout<<"\n\n-------------------------------------";
~book()
cout<<"\n\n\n-------------------------------------";
cout<<"\n\n destructor called";
};
main()//[Link]
{
book*bs[25];
int J=0,choice,count,k=1;
char meinu;
do{
cout<<"*************************"<<"\n";
cout<<"My lms "<<"\n";
cout<<"For More: 0300-0000000"<<"\n";
cout<<"[Link]"<<"\n";
cout<<"*************************"<<"\n";
cout<<"Welcome to E-library Prototype\n";
cout<<"\n-----------------------";
cout<<"\n Enter 1 to Add Books";
cout<<"\n Enter 2 Display Books";
cout<<"\n Enter 0 exist";
cout<<"\n\n-------------------------";
cout<<"\n Enter choice: ";
cin>>choice;
//[Link]
switch(choice)
case 1:
cout<<"\n-----------------------------------";
cout<<"\n\n\n How many records you want to Enter? ";
cin>>count;
do{
//[Link]
bs[J]=new book();
bs[J]->
setter();
J++;
k++;
cout<<"\n-----------------------------------";
cout<<"\n Do you want to add another record?(Y/N):";
cin>>meinu;
while(k<=count && (meinu=='y'|| meinu=='y'));
if(
(meinu=='y'|| meinu=='y') && k>count)
cout<<"\n You have reached the limit , Can''t enter any other records!";
break;
//[Link]
case 2:
cout<<"\n-----------------------------------\n";
cout<<"\n Books details....\n\n";
for(int
m=0;m<J;m++)//[Link]
bs[m]->
getter();
break;
case 0:
for(int
m=0;m<J;m++)
bs[m]->
~book();
exit(0);
cout<<"\n\n show the main menu again? (Y/N):";
cin>>meinu;
//[Link]
while(meinu=='y'||meinu=='y');
for(int m=0;m<J;m++)
bs[m]-> ~book();
return 0;
//[Link]