package edu.clemson.Anthony.McGlauflin;

public class Book {

	public String title;
	public String author;
	Person person;
	
	public Book(String string) {
		this.title = string;
		this.author = "unknown author";
	}
	
	public String getAuthor() {
		return author;
	}
	
	public void setAuthor(String author) {
		this.author = author;
	}
	
	public String getTitle() {
		return title;
	}
	
	public void setPerson(Person p2) {
		this.person = p2;
	}
	
	public Person getPerson() {
		return this.person;
	}
	
	public String toString() {
		if(this.person == null)
			return this.title + ": Available";
		else
			return this.title + ": Checked out to " + this.person.getName();
	}

}
