Last active
January 21, 2019 12:40
-
-
Save jellybob/acfd242a8e1cec151ec231226c3a4607 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String toString() { | |
String message = "The book, " + title + " was written by " + getAuthorName() + " it is " + pageCount() + " pages long."; | |
if (!this.author.alive) { | |
message = message + " It will become public domain in " + getYearsToPublicDomain() + " years."; | |
} | |
return message; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment