public class Patron
{
	private int pid;
	private String pname;
	private double fines;
	private Book book;

	public Patron()
	{
	}

	public Patron(int pid, String pname, double fines, Book book)
	{
		this.pid = pid;
		this.pname = pname;
		this.fines = fines;
		checkBookOut(book);		//or book = bookOut (if passed is bookOut)
	}


	public void setPID(int pid) {this.pid = pid;}
	public void setPName(String pname) {this.pname = pname;}
	public void setFines(double fines) {this.fines = fines;}
	public void setBook(Book book) {this.book = book;	}
	public void checkBookOut(Book book)
	{
		if (book != null)
		{
			this.book = book;
			book.checkOut();
		}
	}

	public void checkBookIn()
	{
		book.checkIn();
		this.book = null;
	}

	public int 	  getPID()   {return pid;}
	public String getPName() {return pname;}
	public double getFines() {return fines;}
	public Book   getBook()  {return book;}
}
