public class Book{

	private boolean available = true;

	public boolean isAvailable() {
		return available;
	}

	public void setBorrowed() {
		if ( available ) {
			available = false;
		}
		else
			throw new RuntimeException();
	}

	public void release() {
		if (! available ) {
			available = true;
		}
		else
			throw new RuntimeException();
	}
}