#include <iostream>
#include <fstream> // for file input/output
#include <string>
using namespace std;

class Book
{
public:
    string ID;
    string title;
    string author;
    string publisher;
    string year;
};

class Borrower
{
public:
    string borrowerID;
    string lastName;
    string firstName;
    string contractNum;
};

class Library
{
public:
    int numBooks;
    Book bookList[1000];
    int numBorrowers;
    Borrower borrowerList[1000];

    Library()
    {
        numBooks = 0;
        numBorrowers = 0;
    }

    void addBook(string ID, string title, string author, string publisher, string year)
    {
        Book book;
        book.ID = ID;
        book.title = title;
        book.author = author;
        book.publisher = publisher;
        book.year = year;
        bookList[numBooks] = book;
        numBooks++;
        cout << "Book added" << endl;
    }

    void addBorrower(string lastName, string firstName, string contractNum)
    {
        Borrower borrower;
        borrower.lastName = lastName;
        borrower.firstName = firstName;
        borrower.contractNum = contractNum;
        borrowerList[numBorrowers] = borrower;
        numBorrowers++;
        cout << "Borrower added" << borrower.borrowerID << endl;
    }
};

Library library;

int extractFields(string line, char fields[][101])
{
    /*
     *	Suggested algorithm:
     *	1. Use loop to check every char of string
     *	2. Handle when it is " or ,
     *	3. Copy the content char into 2D array fields
     *	4. Count the numb Your entire response should be in English, and in all capital letters.
user