Logo 
Search:

C++ Programming Articles

Submit Article
Home » Articles » C++ Programming » ProjectsRSS Feeds

Library Inventory Management Project

Posted By: Easy Tutor     Category: C++ Programming     Views: 20036

A Library shop maintains the inventory of books that are being sold at the shop. The list includes details such as author,title,price,publisher and stock position
Whenever a customer wants a book, the sales person inputs the title and author and the system searches the list and displays whether it is available, the total cost of the requested copies is displayed; otherwise the message "Required copies not in stock" is displayed.

Design a system using a class called books with suitable member functions and constructors Use New operator in constructors to allocate memory space required.

Write a program which suites above requirements.

Code for Library Inventory Management Project in C++ Programming

/*www.DailyFreeCode.comDownload Projects, Sourcecodes, Tips and Tricks, Interview FAQs, Hotlinks and more....Logon to www.DailyFreeCode.com*///Library Program/*A Library shop maintains the inventory of books that are being sold at the shopThe list includes details such as author,title,price,publisher and stock positionWhenever a customer wants a book, the sales person inputs the title and authorand the system searches the list and displays whether it is available, the total costof the requested copies is displayed; otherwise the message "Required copies not in stock"is displayed.    Design a system using a class called books with suitable member functions and constructorsUse New operator in constructors to allocate memory space required.    Write a program which suites above requirements.*/

#include <iostream.h>
#include <iomanip.h>
#include <conio.h>

class library
{
char author[15][20],title[15][20];
int price[15];
char pub[15][20];
int s;
public:
void getdata(void);
void display(void);
};

void library :: getdata(void)
{
cout<<"How many Entry you want to make :-";
cin>>s;
for(int i=0;i<s;i++)
{
cout<<"\n\nEnter Author Name :- ";
cin>>author[i];
cout<<"Enter Book Title :- ";
cin>>title[i];
cout<<"Enter Price of Book :- ";
cin>>price[i];
cout<<"Enter Publisher of Book :- ";
cin>>pub[i];
}
}

void library :: display(void)
{
clrscr();
cout<<setw(50)<<"LIBRARY DATABASE";
cout<<endl<<endl;
for(int a=0;a<40;a++)
    cout<<"*-";
cout<<endl;
cout<<setw(17)<<"AUTHOR NAME"<<setw(20)<<"BOOK TITLE"<<setw(22)<<"PRICE"<<setw(18)<<"PUBLISHER"<<endl;
for(int b=0;b<40;b++)
    cout<<"*-";
cout<<endl;

for(int i=0;i<s;i++)
{
cout<<setw(17)<<author[i]<<setw(20)<<title[i]<<setw(22)<<price[i]<<setw(18)<<pub[i]<<endl;
}
}

void main()
{
clrscr();
library o1;
o1.getdata();
o1.display();
getch();
}
  
Share: 


Didn't find what you were looking for? Find more on Library Inventory Management Project Or get search suggestion and latest updates.

Easy Tutor
Easy Tutor author of Library Inventory Management Project is from United States. Easy Tutor says

Hello Friends,

I am Free Lance Tutor, who helped student in completing their homework.

I have 4 Years of hands on experience on helping student in completing their homework. I also guide them in doing their final year projects.

I have share many programs on this website for everyone to use freely, if you need further assistance, than please contact me on easytutor.2ya [at the rate] gmail [dot] com

I have special discount scheme for providing tutor services. I am providing tutor service to students from various contries, currently most of my students are from United States, India, Australia, Pakistan, Germany, UK and Canada.

I am also here to expand my technical network to receive more opportunity in my career, make friends to help them in resolving their technical problem, learn and share my knowledge, If you like to be my friend, Please send me friend request.

Thanks,
Happy Programming :)

 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
Umair Sando from United States Comment on: Aug 16
aalllllllk u so much
lllaaaaaaaaaa//than

View All Comments