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

You will be writing a Library simulator involving multiple classes. To make thin

ID: 3766946 • Letter: Y

Question

You will be writing a Library simulator involving multiple classes. To make things a little simpler for you, I am supplying you with LibraryItem.hpp, Patron.hpp and Library.hpp. You will write the implementation files for the LibraryItem, Patron and Library classes, and the header and implementation files for three classes that inherit from LibraryItem (Book, Album and Movie).

A couple of notes:

The vector::erase() function lets you delete an element of a vector, shifting over all the elements after it.

You'll see in LibraryItem.hpp a line that says "class Patron;". That is a forward declaration. It doesn't say anything about the definition of the Paton class, but it promises the compiler that there will be a type named Patron. The reason we don't just say "#include Patron.hpp" is that both LibraryItem and Patron need to know about each other, but they can't both #include the other because that would create a cyclic dependency.

Here are descriptions of the three classes:

LibraryItem:

idCode - a unique identifier for a LibraryItem

title - cannot be assumed to be unique

location - a LibraryItem can be either on the shelf, on the hold shelf, or checked out

checkedOutBy - pointer to the Patron who has it checked out (if any)

requestedBy - pointer to the Patron who has requested it (if any); a LibraryItem can only be requested by one Patron at a time

dateCheckedOut - when a LibraryItem is checked out, this will be set to the currentDate of the Library

constructor - takes an idCode, and title; checkedOutBy and requestedBy should be initialized to NULL; a new LibraryItem should be on the shelf

some get and set methods

Book/Album/Movie:

These three classes all inherit from LibraryItem.

All three will need a public static const int CHECK_OUT_LENGTH. For a Book it's 21 days, for an Album it's 14 days, and for a Movie it's 7 days.

All three will have an additional field. For Book, it's a string field called author. For Album, it's a string field called artist. For Movie, it's a string field calleddirector. There will also need to be get methods to return the values of these fields.

Patron:

idNum - a unique identifier for a Patron

name - cannot be assumed to be unique

checkedOutItems - a vector of pointers to LibraryItems that a Patron currently has checked out

fineAmount - how much the Patron owes the Library in late fines

constructor - takes an idNum and name

some get and set methods

addLibraryItem - adds the specified LibraryItem to checkedOutItems

removeLibraryItem - removes the specified LibraryItem from checkedOutItems

amendFine - a positive argument increases the fineAmount, a negative one decreases it; this is allowed to go negative

Library:

holdings - a vector of pointers to LibraryItems in the Library

members - a vector of pointers to Patrons in the Library

currentDate - stores the current date represented as an integer number of "days" since the Library object was created

a constructor that initializes the currentDate to zero

addLibraryItem - adds the parameter to holdings

addPatron - adds the parameter to members

getLibraryItem - returns a pointer to the LibraryItem corresponding to the ID parameter, or NULL if no such LibraryItem is in the holdings

getPatron - returns a pointer to the Patron corresponding to the ID parameter, or NULL if no such Patron is a member

checkOutLibraryItem

if the specified LibraryItem is not in the Library, return "item not found"

if the specified Patron is not in the Library, return "patron not found"

if the specified LibraryItem is already checked out, return "item already checked out"

if the specified LibraryItem is on hold by another Patron, return "item on hold by other patron"

otherwise update the LibraryItem's checkedOutBy, dateCheckedOut and Location; if the LibraryItem was on hold for this Patron, update requestedBy; update the Patron's checkedOutItems; return "check out successful"

returnLibraryItem

if the specified LibraryItem is not in the Library, return "item not found"

if the LibraryItem is not checked out, return "item already in library"

update the Patron's checkedOutItems; update the LibraryItem's location depending on whether another Patron has requested it; update the LibraryItem's checkedOutBy; return "return successful"

requestLibraryItem

if the specified LibraryItem is not in the Library, return "item not found"

if the specified Patron is not in the Library, return "patron not found"

if the specified LibraryItem is already requested, return "item already on hold"

update the LibraryItem's requestedBy; if the LibraryItem is on the shelf, update its location to on hold; return "request successful"

payFine

if the specified Patron is not in the Library, return "patron not found"

use amendFine to update the Patron's fine; return "payment successful"

incrementCurrentDate

increment current date; increase each Patron's fines by 10 cents for each overdue LibraryItem they have checked out (using amendFine)

be careful - a LibraryItem can be on request without its location being the hold shelf (if another Patron has it checked out);

One limited example of how your classes might be used is:

This example obviously doesn't include all of the functions described above. You are responsible for testing all of the required functions to make sure they operate as specified.

You must submit on TEACH: LibraryItem.cpp, Book.hpp, Book.cpp, Album.hpp, Album.cpp, Movie.hpp, Movie.cpp, Patron.cpp, and Library.cpp. You do not need to submit the .hpp files that I provided you.

In the main method you use for testing, you should only need to #include Library.hpp. Remember that your compile command needs to list all of the .cpp files.

Just to think about: There are six possible changes in the location of a Book. Can all six occur?

Explanation / Answer

Code

/* MyBook.hpp */

#ifndef BOOKHPP

#define BOOKHPP

#include <string>

using namespace std;

class MyPatron;

enum Location

{

     ONSHELF, ONHOLDSHELF, CHECKEDOUT

};

class MyBook

{

     private:

          string idCode1;

          string title1;

          string author1;

          Location location1;

          MyPatron* checkedOutBy1;

          MyPatron* requestedBy1;

          int dateCheckedOut1;

     public:

          static const int CHECKOUTLENGTH = 21;

          MyBook();

          MyBook(string idc1, string t, string a);

          string getIdCode1();

          string getTitle1();

          string getAuthor1();

          Location getLocation1();

          void setLocation1(Location lo);

          MyPatron* getCheckedOutBy1();

          void setCheckedOutBy1(MyPatron* p);

          MyPatron* getRequestedBy1();

          void setRequestedBy1(MyPatron* p);

          int getDateCheckedOut1();

          void setDateCheckedOut1(int d);

};

#endif

/* MyBook.cpp */

#include "MyPatron.hpp"

#include "MyBook.hpp"

using namespace std;

static int cinc = 1;

MyBook::MyBook()

{

     cinc++;

     idCode1 = "C" + cinc;

     title1 = "";

     author1 = "";

     setLocation1(ONSHELF);

     setCheckedOutBy1(NULL);

     setRequestedBy1(NULL);

     setDateCheckedOut1(0);

}

MyBook::MyBook(string idc1, string t, string a)

{

     idCode1 = idc1;

     title1 = t;

     author1 = a;

     setLocation1(ONSHELF);

     setCheckedOutBy1(NULL);

     setRequestedBy1(NULL);

     setDateCheckedOut1(0);

}

string MyBook::getIdCode1()

{

     return idCode1;

}

string MyBook::getTitle1()

{

     return title1;

}

string MyBook::getAuthor1()

{

     return author1;

}

Location MyBook::getLocation1()

{

     return location1;

}

void MyBook::setLocation1(Location lo)

{

     location1 = lo;

}

MyPatron* MyBook::getCheckedOutBy1()

{

     return checkedOutBy1;

}

void MyBook::setCheckedOutBy1(MyPatron* p)

{

     checkedOutBy1 = p;

}

MyPatron* MyBook::getRequestedBy1()

{

     return requestedBy1;

}

void MyBook::setRequestedBy1(MyPatron* p)

{

     requestedBy1 = p;

}

int MyBook::getDateCheckedOut1()

{

     return dateCheckedOut1;

}

void MyBook::setDateCheckedOut1(int d)

{

     dateCheckedOut1 = d;

}

/* MyLibrary.hpp */

#ifndef LIBRARYHPP

#define LIBRARYHPP

#include <string>

#include <vector>

#include <iostream>

#include <iomanip>

using namespace std;

class MyPatron;

class MyBook;

class MyLibrary

{

     private:

          vector<MyBook> holdings;

          vector<MyPatron> members;

          int currentDate1;

     public:

          MyLibrary();

          void addBook1();

          void addMember1();

          void checkOutBook1(string patronID1, string bookID1);

          void returnBook1(string bookID1);

          void requestBook1(string patronID1, string bookID1);

          void incrementCurrentDate1();

          void payFine1(string patronID1, double payment1);

          void viewPatronInfo1(string patronID1);

          void viewBookInfo1(string bookID1);

};

#endif

/* MyLibrary.cpp */

#include "MyBook.hpp"

#include "MyPatron.hpp"

#include "MyLibrary.hpp"

using namespace std;

MyLibrary::MyLibrary()

{

     currentDate1 = 0;

     holdings.reserve(100);

     members.reserve(100);

}

void MyLibrary::addBook1()

{

     string idCode1;

     string title1;

     string author1;

     cout <<endl<< "New Book"<<endl;

     cout <<endl<< "--------"<<endl;

     cout <<endl<< "Enter ID-Code: ";

     getline(cin, idCode1);

     cout << "Enter Title: ";

     getline(cin, title1);

     cout << "Enter Author: ";

     getline(cin, author1);

     for(int i = 0; i < holdings.size(); i++)

     {

          if(holdings[i].getIdCode1() == idCode1)

          {

              cout <<endl<< "Book ID-Code is in use"<<endl;

              return;

          }

     }

     MyBook newBook(idCode1, title1, author1);

     holdings.push_back(newBook);

}

void MyLibrary::addMember1()

{

     string idNum1;

     string name1;

     cout <<endl<< "New Patron";

     cout <<endl<<"----------"<<endl;

     cout << "Enter ID-Number: ";

     getline(cin, idNum1);

     cout << "Enter Name: ";

     getline(cin, name1);

     for(int i = 0; i < members.size(); i++)

     {

          if(members[i].getIdNum1() == idNum1)

          {

              cout <<endl<< "Patron ID-Number is in use"<<endl;

              return;

          }

     }

     MyPatron newPatron(idNum1, name1);

     members.push_back(newPatron);

}

void MyLibrary::checkOutBook1(string patronID1, string bookID1)

{

     int counts = 0;

     for(int i = 0; i < members.size(); i++)

     {

          if(members[i].getIdNum1() == patronID1)

          {

              counts++;

          }

     }

     if(counts == 0)

     {

          cout <<endl<<"Patron doesn't exist"<<endl;

          return;

    }

    else

          counts = 0;

     for(int i = 0; i < holdings.size(); i++)

     {

          if(holdings[i].getIdCode1() == bookID1)

          {

              counts++;

          }

     }

     if(counts == 0)

    {

          cout <<endl<< "Book doesn't exist"<<endl;

        return;

   }

    else

          counts = 0;

     for(int i = 0; i < members.size(); i++)

     {

          for(int y = 0; y < members[i].getCheckedOutBooks1().size();      y++)

          {

              if(members[i].getCheckedOutBooks1()[y]->getIdCode1() ==           bookID1)

              {

                   cout <<endl<< "Book is already checkedout"<<endl;

                   return;

              }

          }

     }

     for(int i = 0; i < holdings.size(); i++)

     {

          if(holdings[i].getIdCode1() == bookID1)

          {

              for(int y = 0; y < members.size(); y++)

              {

                   if(members[y].getIdNum1() == patronID1)

                   {

                        if(holdings[i].getRequestedBy1() != NULL)

                        {

                                  if(holdings[i].getRequestedBy1()->

                             getIdNum1() == patronID1)

                                  {

                                  holdings[i].setRequestedBy1(NULL);

                                  }

                                  else

                                  {

                                  cout <<endl<<"Book is onhold by                                    another patron"<<endl;

                                  return;

                                  }

                        }

                        holdings[i].setCheckedOutBy1(&members[y]);

                        holdings[i].setDateCheckedOut1(currentDate1);

                        holdings[i].setLocation1(CHECKEDOUT);

                        members[y].addBook1(&holdings[i]);

                        cout <<endl<< "The book " <<                                            holdings[i].getTitle1() << " has been checked "

                        <<endl;

                        cout << "out to " << members[y].getName1()

                        << endl;

                        return;

                   }

              }

          }

     }

}

void MyLibrary::returnBook1(string bookID1)

{

     int counts = 0;

     for(int i = 0; i < holdings.size(); i++)

    {

          if(holdings[i].getIdCode1() == bookID1)

        {

              counts++;

        }

    }

    if(counts == 0)

    {

          cout <<endl<<"That book is not in the library"<<endl;

        return;

    }

    else

          counts = 0;

    for(int i = 0; i < holdings.size(); i++)

    {

          if(holdings[i].getIdCode1() == bookID1)

        {

              if(holdings[i].getLocation1() == CHECKEDOUT)

            {

                   holdings[i].getCheckedOutBy1()->

                   removeBook1(&holdings[i]);

                   holdings[i].setCheckedOutBy1(NULL);

                   if(holdings[i].getRequestedBy1() == NULL)

                   {

                        holdings[i].setLocation1(ONSHELF);

                   }

                   else

                   {

                        holdings[i].setLocation1(ONHOLDSHELF);

                   }

                   cout <<endl<< "Book " << holdings[i].getTitle1() <<"

                   has been returned"<<endl;

                    return;

            }

            else

            {

                   cout <<endl<< "Book isn't checkedout"<<endl;

                   return;

            }

        }

    }

}

void MyLibrary::requestBook1(string patronID1, string bookID1)

{

     int counts = 0;

     for(int i = 0; i < members.size(); i++)

     {

          if(members[i].getIdNum1() == patronID1)

          {

              counts++;

          }

     }

     if(counts == 0)

    {

          cout <<endl<< "Patron doesn't exist"<<endl;

        return;

    }

    else

        counts = 0;

     for(int i = 0; i < holdings.size(); i++)

     {

          if(holdings[i].getIdCode1() == bookID1)

          {

              counts++;

          }

     }

     if(counts == 0)

    {

          cout <<endl<< "Book doesn't exist"<<endl;

        return;

    }

    else

          counts = 0;

     for(int i = 0; i < holdings.size(); i++)

     {

          if(holdings[i].getIdCode1() == bookID1)

        {

              if(holdings[i].getRequestedBy1() != NULL)

            {

                   cout <<endl<< "Book " << holdings[i].getTitle1() <<                " is already requested";

                   cout << " by " << holdings[i].getRequestedBy1()-                        >getName1() << endl;

                   return;

            }

            if(holdings[i].getCheckedOutBy1() != NULL)

            {

                   if(holdings[i].getCheckedOutBy1()->getIdNum1() ==                  patronID1)

                   {

                        cout <<endl<< "Book " <<                                           holdings[i].getTitle1() << " is already                            checked";

                        cout << " out to " <<                                              holdings[i].getCheckedOutBy1()->getName1()

                        << endl;

                        return;

                   }

            }

            if(holdings[i].getRequestedBy1() == NULL)

            {

                   for(int y = 0; y < members.size(); y++)

                   {

                        if(members[y].getIdNum1() == patronID1)

                        {

                                  holdings[i].setRequestedBy1(&members[y]);

                                  if(holdings[i].getLocation1() == ONSHELF)

                                  {

                                  holdings[i].setLocation1

                                  (ONHOLDSHELF);

                             }

                                  cout <<endl<< "Book " <<                                           holdings[i].getTitle1()

                             << " has been requested";

                                  cout << " by " << members[y].getName1()

                             << endl;

                                  return;

                        }

                   }

            }

        }

     }

}

void MyLibrary::payFine1(string patronID1, double payment1)

{

     int counts = 0;

     for(int i = 0; i < members.size(); i++)

     {

          if(members[i].getIdNum1() == patronID1)

          {

              counts++;

          }

     }

     if(counts == 0)

    {

          cout <<endl<< "Patron doesn't exist"<<endl;

        return;

    }

    else

          counts = 0;

     for(int i = 0; i < members.size(); i++)

     {

          if(members[i].getIdNum1() == patronID1)

        {

              members[i].amendFine1(payment1);

            cout << "The fines for " << members[i].getName1();

            cout << fixed << setprecision(2);

            cout << " are now $" << members[i].getFineAmount1()<<                   " ";

        }

     }

}

void MyLibrary::incrementCurrentDate1()

{

     currentDate1++;

    for(int i = 0; i < members.size(); i++)

    {

          for(int y = 0; y < members[i].getCheckedOutBooks1().size();      y++)

        {

              if((currentDate1 - members[i].getCheckedOutBooks1()[y]-             >getDateCheckedOut1()) > MyBook::CHECKOUTLENGTH)

            {

                   members[i].amendFine1(0.10);

            }

        }

    }

}

void MyLibrary::viewPatronInfo1(string patronID1)

{

     int counts = 0;

     for(int i = 0; i < members.size(); i++)

     {

          if(members[i].getIdNum1() == patronID1)

          {

              counts++;

          }

     }

     if(counts == 0)

    {

          cout <<endl<< "Patron doesn't exist"<<endl;

        return;

    }

    else

          counts = 0;

    for(int i = 0; i < members.size(); i++)

    {

          if(members[i].getIdNum1() == patronID1)

        {

              cout <<endl<< "Patron Details:"<<endl;

            cout << "------------"<<endl;

              cout << "ID: " << members[i].getIdNum1() << endl;

            cout << "Name: " << members[i].getName1() << endl;

            cout << fixed << setprecision(2);

            cout << "Current Fines: $" << members[i].getFineAmount1()               << endl;

              cout << endl<<"Checked Out Books:"<<endl;

            if(members[i].getCheckedOutBooks1().size() == 0)

                   cout << "none"<<endl;

            else

            {

                   for(int y = 0; y <                                                 members[i].getCheckedOutBooks1().size(); y++)

                   {

                        cout << members[i].getCheckedOutBooks1()[y]-                            >getTitle1() << endl;

                   }

            }

        }

    }

}

void MyLibrary::viewBookInfo1(string bookID1)

{

     int counts = 0;

     for(int i = 0; i < holdings.size(); i++)

     {

          if(holdings[i].getIdCode1() == bookID1)

          {

              counts++;

          }

     }

     if(counts == 0)

    {

          cout <<endl<< "Book does not exist"<<endl;

        return;

    }

    else

          counts = 0;

     for(int i = 0; i < holdings.size(); i++)

     {

          if(holdings[i].getIdCode1() == bookID1)

          {

              cout <<endl<< "Book Details:"<<endl;

            cout << "----------"<<endl;

            cout << "ID: " << holdings[i].getIdCode1() <<endl;

            cout << "Title: " << holdings[i].getTitle1() << endl;

            cout << "Author: " << holdings[i].getAuthor1() << endl;

            cout << "Location: ";

            switch(holdings[i].getLocation1())

            {

                   case 0:

                        cout << "on-shelf"<<endl;

                   break;

                    case 1:

                        cout << "on-hold-shelf"<<endl;

                   break;

                   case 2:

                        cout << "checkedout"<<endl;

                        break;

            }

            cout << "RequestedBy: ";

            if(holdings[i].getRequestedBy1() != NULL)

            {

                   cout << holdings[i].getRequestedBy1()->getName1() <<                    endl;

            }

            else

                   cout << "none"<<endl;

                   cout << "CheckedOut By: ";

            if(holdings[i].getCheckedOutBy1() != NULL)

            {

                   cout << holdings[i].getCheckedOutBy1()->getName1()               << endl;

            }

            else

                   cout << "none"<<endl;

                   cout << "No. of Days Left Till Due: ";

                   if((currentDate1 - holdings[i].getDateCheckedOut1())                    > MyBook::CHECKOUTLENGTH)

                   {

                        cout << "overdue"<<endl;

                   }

            else

               cout << (MyBook::CHECKOUTLENGTH - (currentDate1 -                  holdings[i].getDateCheckedOut1()));

               cout << endl;

          }

     }

}

/* MyPatron.hpp */

#ifndef PATRONHPP

#define PATRONHPP

#include <string>

#include <vector>

using namespace std;

class MyBook;

class MyPatron

{

     private:

          string idNum1;

          string name1;

          vector<MyBook*> checkedOutBooks1;

          double fineAmount1;

     public:

          MyPatron();

          MyPatron(string idn, string n);

          string getIdNum1();

          string getName1();

          vector<MyBook*> getCheckedOutBooks1();

          void addBook1(MyBook* b);

          void removeBook1(MyBook* b);

          double getFineAmount1();

          void amendFine1(double amount);

};

#endif

/* MyPatron.cpp */

#include "MyPatron.hpp"

#include "MyBook.hpp"

using namespace std;

static int ninc = 1;

MyPatron::MyPatron()

{

     ninc++;

     idNum1 = "N" + ninc;

     name1 = "";

     fineAmount1 = 0.00;

}

MyPatron::MyPatron(string idn, string n)

{

     ninc++;

     idNum1 = idn;

     name1 = n;

     fineAmount1 = 0.00;

}

string MyPatron::getIdNum1()

{

     return idNum1;

}

string MyPatron::getName1()

{

     return name1;

}

vector<MyBook*> MyPatron::getCheckedOutBooks1()

{

     return checkedOutBooks1;

}

void MyPatron::addBook1(MyBook* b)

{

     checkedOutBooks1.push_back(b);

}

void MyPatron::removeBook1(MyBook* b)

{

     for(int i = 0; i < checkedOutBooks1.size(); i++)

     {

          if(checkedOutBooks1[i]->getIdCode1() == b->getIdCode1())

              checkedOutBooks1.erase(checkedOutBooks1.begin() + i);

     }

}

double MyPatron::getFineAmount1()

{

     return fineAmount1;

}

void MyPatron::amendFine1(double amount)

{

     fineAmount1 += amount;

}

/* Menu.cpp */

#include <iostream>

#include "MyBook.hpp"

#include "MyPatron.hpp"

#include "MyLibrary.hpp"

using namespace std;

int main()

{

    int options = 0;

    string patronID1, bookID1;

    double payment1;

     MyLibrary puyallup1;

    cout <<endl<< "Welcome to Library!"<<endl;

    while(options != 10)

    {

          cout <<endl<< "Choose options:"<<endl;

          cout << "-----------------"<<endl;

        cout << "1. Add book 2 Inventory"<<endl;

        cout << "2. Add new member 2 library"<<endl;

        cout << "3. Checkout book"<<endl;

        cout << "4. Return book"<<endl;

        cout << "5. Request book"<<endl;

        cout << "6. Payfine"<<endl;

        cout << "7. Increment currentDate"<<endl;

        cout << "8. View patron details"<<endl;

        cout << "9. View book info ";

        cout << "10. Quit"<<endl;

        cout <<endl<< "Selection: ";

        cin >> options;

          cin.ignore();

        switch(options)

        {

              case 1:

                   puyallup1.addBook1();

                   break;

            case 2:

                   puyallup1.addMember1();

                   break;

            case 3:

                   cout <<endl<< "CheckOut a Book"<<endl;

                   cout << "----------------"<<endl;

                   cout << "Enter Patron-ID: ";

                   getline(cin, patronID1);

                   cout << "Enter Book-ID: ";

                   getline(cin, bookID1);

                   puyallup1.checkOutBook1(patronID1, bookID1);

                   break;

            case 4:

                   cout << "Return Book"<<endl;

                   cout << "-------------"<<endl;

                   cout << "Enter Book-ID: ";

                   getline(cin, bookID1);

                   puyallup1.returnBook1(bookID1);

                   break;

            case 5:

                   cout <<endl<< "Request a Book"<<endl;

                   cout << "--------------"<<endl;

                   cout << "Enter Patron-ID: ";

                   getline(cin, patronID1);

                   cout << "Enter Book-ID: ";

                   getline(cin, bookID1);

                   puyallup1.requestBook1(patronID1, bookID1);

                   break;

            case 6:

                   cout <<endl<< "Pay Fine"<<endl;

                   cout << "--------"<<endl;

                   cout << "Enter Patron-ID: ";

                   getline(cin, patronID1);

                   cout << "Enter Payment Amount: ";

                   cin >> payment1;

                   puyallup1.payFine1(patronID1, payment1);

                   break;

            case 7:

                   cout <<endl<<"Date incremented by 1-day"<<endl;

                   puyallup1.incrementCurrentDate1();

                   break;

            case 8:

                   cout <<endl<< "View Patron Details"<<endl;

                   cout << "----------------"<<endl;

                   cout << "Enter Patron-ID: ";

                   getline(cin, patronID1);

                   puyallup1.viewPatronInfo1(patronID1);

                   break;

            case 9:

                   cout <<endl<< "View Book Details"<<endl;

                   cout << "--------------"<<endl;

                   cout << "Enter Book-ID: ";

                   getline(cin, bookID1);

                   puyallup1.viewBookInfo1(bookID1);

                   break;

          }

    }

    cout << endl<<endl<<"U have selected 2 quit, plz click      enter!"<<endl;

    cin.ignore();

    cin.get();

     return 0;

}

Output

Welcome to Library!

Choose options:

-----------------

1. Add book 2 Inventory

2. Add new member 2 library

3. Checkout book

4. Return book

5. Request book

6. Payfine

7. Increment currentDate

8. View patron details

9. View book details

10. Quit

Selection: 1

New Book

--------

Enter ID-Code: 01

Enter Title: A

Enter Author: Ami

Choose options:

-----------------

1. Add book 2 Inventory

2. Add new member 2 library

3. Checkout book

4. Return book

5. Request book

6. Payfine

7. Increment currentDate

8. View patron details

9. View book details

10. Quit

Selection: 2

New Patron

----------

Enter ID-Number: 001

Enter Name: Amith

Choose options:

-----------------

1. Add book 2 Inventory

2. Add new member 2 library

3. Checkout book

4. Return book

5. Request book

6. Payfine

7. Increment currentDate

8. View patron details

9. View book details

10. Quit

Selection: 5

Request a Book

--------------

Enter Patron-ID: 001

Enter Book-ID: 01

Book A has been requested by Amith

Choose options:

-----------------

1. Add book 2 Inventory

2. Add new member 2 library

3. Checkout book

4. Return book

5. Request book

6. Payfine

7. Increment currentDate

8. View patron details

9. View book details

10. Quit

Selection:

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