public class Book {
    private String title;
    private String author;
    public Book(String myAuthor, String myTitle) {
        title = myTitle;
        author = myAuthor;
    }
    
    boolean doesTitleContain(String word) {
        String lowerCaseTitle = title.toLowerCase();
        String lowerCaseWord = word.toLowerCase();
        return lowerCaseTitle.indexOf(lowerCaseWord) >= 0;
    }
    
    boolean doesAuthorContain(String word) {
        String lowerCaseAuthor = author.toLowerCase();
        String lowerCaseWord = word.toLowerCase();
        return lowerCaseAuthor.indexOf(lowerCaseWord) >= 0;
    }
    
    public String showInfo() {
        return "Title: " + title + "\n" +
        "Author: " + author + "\n";
    }
}

