package com.twu.biblioteca.options;

import com.twu.biblioteca.Biblioteca;
import com.twu.biblioteca.GUI;

/**
 * Created by gdias on 8/3/15.
 */
public class CheckoutOption extends AbstractOption {

    public CheckoutOption(int id, String name) {
        super(id, name);
    }

    @Override
    public String execute(Biblioteca biblioteca) {
        System.out.println("Enter book name, please.");
        String userInputBook = GUI.getUserInput();

        if(biblioteca.checkoutResource(userInputBook)) {
            return "Thank you! Enjoy the book.";
        } else {
            return "That book is not available.";
        }
    }
}

@@ -545,16 +545,10 @@
 joy 
+i
 t
-he book
 .%22;%0A
@@ -589,20 +589,24 @@
 n %22That 
-book
+resource
  is not 

Change checkout messages