1 00:00:00,500 --> 00:00:04,070 Now that we've written the methods for the library class, we can start thinking about 2 00:00:04,070 --> 00:00:08,740 how to implement the methods in our patron class, check out and return book. 3 00:00:08,740 --> 00:00:11,530 Our rough plan didn't have any methods for the book class, so for 4 00:00:11,530 --> 00:00:13,950 now we don't have to worry about that. 5 00:00:13,950 --> 00:00:16,890 As we know from our experience with real-life libraries, 6 00:00:16,890 --> 00:00:19,320 a patron has the ability to check out a book. 7 00:00:19,320 --> 00:00:23,430 We need to write a method on our patron class that models this activity. 8 00:00:23,430 --> 00:00:26,630 Our check out method has to do something to indicate that the patron 9 00:00:26,630 --> 00:00:28,150 has checked out a book. 10 00:00:28,150 --> 00:00:31,710 One obvious way to do this is to set the patrons currentBook property 11 00:00:31,710 --> 00:00:35,630 to the book object representing the book that's being checked out. 12 00:00:35,630 --> 00:00:38,330 Setting the currentBook property can be done in the checkout method. 13 00:00:39,860 --> 00:00:43,550 Having this property is great because the library employee can see what book 14 00:00:43,550 --> 00:00:46,840 any given patron has checked out at any time. 15 00:00:46,840 --> 00:00:47,840 But wait a second. 16 00:00:47,840 --> 00:00:49,910 This doesn't seem like enough to me. 17 00:00:49,910 --> 00:00:52,470 Shouldn't this information go two ways? 18 00:00:52,470 --> 00:00:56,270 I think a library employee should be able to look up any book object, 19 00:00:56,270 --> 00:01:00,060 see if it's been checked out, and who checked it out and see when it's due. 20 00:01:01,070 --> 00:01:03,810 This is where we have to both expand on a rough plan and 21 00:01:03,810 --> 00:01:06,320 go on a little bit of a coding tangent. 22 00:01:06,320 --> 00:01:09,920 Information like whether a book has been checked out, who checked it out and 23 00:01:09,920 --> 00:01:13,850 when it's due should probably be properties on the book class, right? 24 00:01:13,850 --> 00:01:15,650 Let us go back and add those. 25 00:01:15,650 --> 00:01:18,650 Open up the attached work space to find an updated read me and 26 00:01:18,650 --> 00:01:20,290 follow the instructions. 27 00:01:20,290 --> 00:01:22,880 There is a summary of what we discussed in this video in the following 28 00:01:22,880 --> 00:01:23,490 instruction step.