int checkout(Patron& p, Book& b)
{   /* receives by reference a patron and book instance
     tests whether the patron can borrow the book and changes the appropriate attributes if yes
     returns 1 if checkout is successful and 0 if not
     */
    if (p.getNumberBorrowed() <5) //tests if patron can borrow book and still be within max amount
    {
        if (b.getCheckOutStatus()==0) //tests if book is already checked out
        {
            b.setCheckOutStatus(1);//changes checkout status of book instance
            p.setBorrowed(b); //adds book to patron attribute "borrowed"
            p.setNumberBorrowedOut(); //adds 1 to numberBorrowed
            return 1;
        }
        else
        {
            return 0;
        }
    }
    else
    {
        return 0;
    }
}