-Okay, so let me look at the requirements and - -2
-it's something that I can see here that we didn't point out before is that - -3
-there seems to be clearly some concept of a due date. And I'm telling you why - -4
-I'm saying that because here, for example, I notice that it says when items are - -5
-due. We mention overdue several times, so is - -6
-this something we need to keep track of? - -7
->> Yeah remember when we used to stamp them on the books? In the stamp pad? - -8
->> Oh yeah yeah yeah! Oh course! - -9
->> Right? Yeah we definitely keep track of, - -10
-the system has to keep track of when books are due. - -11
->> Okay. So it seems to me that one good way - -12
-of doing that is by basically adding an attribute to the, item. - -13
->> Okay. - -14
->> And I'll just call it due date. - -15
->> Okay. - -16
->> So basically for each item in case it's loaned - -17
-there will be this attribute that will contain the value of - -18
->> Okay. - -19
->> Of when, when the item is due. And then, something else that I noticed - -20
-here is that down here, it seems like - -21
-the requirements are saying that an item can - -22
-be renewed only once. So, I guess, that's - -23
-something we need to keep track of, right? - -24
->> Yeah. - -25
->> The system needs to know. - -26
->> We have to know whether they've renewed it or not. - -27
->> Okay so, I'll do a similar thing here. I think I want to go and add a an - -28
-attribute that we'd call number of times renewed, and add it to the item class. - -29
->> Okay. - -30
->> And this is kind of more generic - -31
-than what you need, because here it says only once, but - -32
-let's say that in the future you want to allow it to, - -33
-kind of renew twice, you'll be able to use these attributes again - -34
-because, we can just count how many times it was renewed. Okay? - -35
->> Makes sense. - -36
->> Alright. And one last thing I want to point out. - -37
-And this seems obvious but I'm going to check with - -38
-you anyways. And seems like there is a basically the - -39
-need to keep track of whether an item is checked - -40
-out or not. If you look at the text here, - -41
-the requirements here, I can see that check out and checked out are - -42
-mentioned five times. So, I'm assuming that that's something also - -43
-that we want to know about an item, whether it's checked out or not. - -44
->> We have to keep track of whether they're checked out. - -45
->> Okay, so I'll add an - -46
-additional attribute there. So I'm going to again go - -47
-back to the diagram and I'm - -48
-just going to write here also the checked out attribute. - -49
-And, I think that's it as far as I'm - -50
-concerned. Is there anything that you think is missing? - -51
->> Well, I do have a question. Would checked out, - -52
-better not be the case that someone can check out a reference book. - -53
->> Oh, I see, I see. - -54
->> Okay. I mean, it's only the books and - -55
-the audio visual material that can be checked out. - -56
->> Right, right, right. Okay, so I, I guess, well the way I will fix that is, - -57
-I'll probably put yet another attribute in the item class, and I'll - -58
-call it loanable. And basically, this attribute is just telling us whether - -59
-an item is loanable or not. So, when it's not true and - -60
-loanable is not on. Basically, that item can be checked out. - -61
->> Okay. And, the system would know this. - -62
->> The system will know that. - -63
->> And prevent it from happening. - -64
->> And prevent it from happening. Okay? - -65
->> Alright. - -66
->> Perfect. So, we're going to do that and, any other objections, - -67
-any other? - -68
->> No, that was my question. - -69
->> Okay, perfect, so what I'm going to do next, I - -70
-mean, I haven't mentioned that yet, but you know classes right - -71
-now we just looked at the attributes right that give - -72
-you sort of the state of the class. And there's something - -73
-else, there's a second part of the class that is kind of - -74
-an orthogonal aspect, which is what the class can do. And we - -75
-call those operations. So normally these kinds also have operations, I - -76
-guess you know it would make sense to you as well. - -77
-And one way, one very natural way to - -78
-identify operations is to look at the requirements and - -79
-look for verbs. Because verbs associated with an item - -80
-will tell you basically what the item can do. - -81
->> Okay. - -82
->> So I, I'd like to go back to the requirements and - -83
-start, the same way in which we underlined, nouns, we're going to underline - -84
-verbs and we're going to see which ones of those verbs actually represent - -85
-actions that we want to represent explicitly, we want to model explicitly in - -86
-our class diagram. - -87
->> Okay. - -88
->> Okay. - -- cgit 1.4.1