Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your college bookstore has hired you as a summer intern to design a textbook inv

ID: 3537296 • Letter: Y

Question

Your college bookstore has hired you as a summer intern to design a textbook inventory system. It is to include the following major processes.

a. Ordering textbooks, b. Receiving textbooks, c. Determining retail price, d. Pricing used textbooks, e. Determining quantity on hand, f. Recording textbook sales, g. Recording textbook returns


Write the abstract data type interface (i.e. header file) for the inventory system. Each function prototype should include name, parameters, purpose, preconditions, return value types. You may add additional functions as required by your analysis.

You do not need to write the implementation file for your abstract data type interface.

Explanation / Answer

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<<" Enter 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();
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote