/** * This class represents a single book * @author alchambers */ public class Book{ private String title; /** * Creates a new book * @param theTitle The title of the book */ public Book(String theTitle){ title = theTitle; } /** * Returns the title of the book * @return The title of the book */ public String getTitle(){ return title; } /** * Returns a string representation of the state * of the object * @return A string representing the state of the book */ public String toString(){ return "Title: " + title; } /** * Determines whether this book is the same as the other book * @param other Another book * @return True if this book and the other book are the same, false otherwise. */ public boolean equals(Book other){ return title.equals(other.title); } }