-Okay, so let me see if - -2
-anything changed after we did this last modification. - -3
-Acutally, there is someting that I would like - -4
-to do here. Because looking at this a little - -5
-bit more, I noticed that there are two - -6
-attributes, renewed and due date. That we have in - -7
-loanable Item, right? But they don't seem to - -8
-be really, attributes or characteristics of loanable Item. - -9
-They're more of the characteristics of the association between the - -10
-Loanable Item and the patron. Wouldn't you agree? - -11
->> Well, yeah, it's not like you could - -12
-only renew a book once in it's entire history. - -13
->> Right. Exactly, exactly. So, that's why what l like - -14
-to do is I would like to move those out of loanable - -15
-item. And actually there is a construct that we can use - -16
-to express this. It's called, we haven't seen it yet, but it's - -17
-a special kind of class. It's called an association - -18
-class. So, it's a class that is connected to - -19
-a specific association. So what we can do - -20
-here, we can create this class, which I'm going to - -21
-call checked out. I'm going to, associate it with - -22
-this, association. I'm going to connect it with this association. And - -23
-then I'm going to move the due date and the - -24
-renewed attributes From the LoanableItem here in this checked - -25
-out class. So in this way, seems to me that - -26
-it makes it very explicit for somebody looking at this - -27
-class diagram, that these characteristics are characteristics of the loan, - -28
-and not of the elements involved in the loan. - -29
->> Can you do the same thing with Fine, isn't Fine a property of the - -30
-loan? Yeah, actually is right because - -31
-a fine is a fine for a specific loan, right? - -32
->> That's correct. - -33
->> Okay, so yeah. Then we can do that. - -34
-We don't need to represent fine as a class, we can just transform - -35
-that into an attribute that we can put into the checked out association class. - -36
->> Gotcha. - -37
->> Anything else? - -38
->> Yeah. It occurred to me that there's another thing that happens in one - -39
-of my scenarios, I put down - -40
-about the patron actually returning an item. - -41
->> Right. Okay, so we would probably need an additional operation, - -42
-I guess, for the patron. - -43
->> Right. - -44
->> So, okay, so what I'm going to do, that's pretty easy - -45
-to do, I'm just going to add the return operation here in the - -46
-patron, and when that happens, that will mean that I'll get rid - -47
-of this association class because the item is returned. Is that right? - -48
->> Well, what happens if somebody drops the - -49
-book in the book drop, but doesn't pay the, - -50
-if it's overdue and doesn't pay the fine? - -51
-Will that get rid of the information about what - -52
-they owe? - -53
->> Oh, I see. So you can have the item being available, but you still - -54
-want to know whether there is any pending fines on the book. - -55
->> Uh-huh, and how much those fines are. - -56
->> And how do you compute how much it is? - -57
->> It's how many days it was, from the time it was - -58
-due, to when they returned it. I see. OK. - -59
-So you know what we can do? I think - -60
-we can put an additional attribute in the checked out - -61
-class and I'm going to call it when returned and - -62
-that item will have either a special value or it - -63
-will contain the date in which the book was - -64
-returned. So in this way you should be able to - -65
-keep this in the system until it's paid, and also to compute - -66
-how much the fine is. Is that working? - -67
->> So the special value is for a normal situation when they - -68
-haven't, they don't owe anything and haven't returned it yet. - -69
->> Exactly so that will tell us that, - -70
-that the loan is still active basically. - -71
->> Great. - -72
->> Does that work for you? - -73
->> Yes. And you know, I like this. I mean, I feel pretty good - -74
-about it. I think we have a nice class diagram. So what I'd like to - -75
-do is just go off and clean it up a little bit, and put it - -76
-in an IDE so I can pretty print it and rearrange things a little bit. - -77
-And then I'd like to sit down again and - -78
-just go through it for a last time. And - -79
-for some final considerations. So if you don't mind - -80
-we will take a ten minute break and reconvene here. - -81
->> That's fine. - -82
->> Alright. - -- cgit 1.4.1