Chapter 3: "Classes" Data Structures with Java, Rick Mercer Answers to Self-Check Questions 3-1 make the assertions pass - answers in order 1 4 3 5 3-2 make the assertions pass - answers in order 6 -1 6 2 3-3 type: LibraryBook 3-4 methods: borrowBook, returnBook, getBorrower and you could say LibraryBook which is a special method also known as a constructor 3-5 String 3-6 nothing, it is a void return type. 3-7 String 3-8 two (both String) 3-9 LibraryBook pp = new LibraryBook("Program Design and Development", "Rick Mercer"); 3-10 pp.borrowBook("Anna"); 3-11 pp.getBorrower(); 3-12 both a and b pass 3-13 public String getTitle(){ return title; } 3-14 getTitle - answers listed in order "C++" "Java" 3-15 NOTE: assuming code meant false if a book IS borrowed public boolean isAvailable(LibraryBood book){ return borrower == null; } 3-16 getTitle assertions - answers listed in order true true false false 3-17 public String toString(){ return "" + ID + " " + balance; } 3-18 Answer not supplied since a hand-written answer is required homework due Friday 7-Sep at 10:00 am in our lecture hall