Okay, so let me look at the requirements and
it's something that I can see here that we didn't point out before is that
there seems to be clearly some concept of a due date. And I'm telling you why
I'm saying that because here, for example, I notice that it says when items are
due. We mention overdue several times, so is
this something we need to keep track of?
>> Yeah remember when we used to stamp them on the books? In the stamp pad?
>> Oh yeah yeah yeah! Oh course!
>> Right? Yeah we definitely keep track of,
the system has to keep track of when books are due.
>> Okay. So it seems to me that one good way
of doing that is by basically adding an attribute to the, item.
>> Okay.
>> And I'll just call it due date.
>> Okay.
>> So basically for each item in case it's loaned
there will be this attribute that will contain the value of
>> Okay.
>> Of when, when the item is due. And then, something else that I noticed
here is that down here, it seems like
the requirements are saying that an item can
be renewed only once. So, I guess, that's
something we need to keep track of, right?
>> Yeah.
>> The system needs to know.
>> We have to know whether they've renewed it or not.
>> Okay so, I'll do a similar thing here. I think I want to go and add a an
attribute that we'd call number of times renewed, and add it to the item class.
>> Okay.
>> And this is kind of more generic
than what you need, because here it says only once, but
let's say that in the future you want to allow it to,
kind of renew twice, you'll be able to use these attributes again
because, we can just count how many times it was renewed. Okay?
>> Makes sense.
>> Alright. And one last thing I want to point out.
And this seems obvious but I'm going to check with
you anyways. And seems like there is a basically the
need to keep track of whether an item is checked
out or not. If you look at the text here,
the requirements here, I can see that check out and checked out are
mentioned five times. So, I'm assuming that that's something also
that we want to know about an item, whether it's checked out or not.
>> We have to keep track of whether they're checked out.
>> Okay, so I'll add an
additional attribute there. So I'm going to again go
back to the diagram and I'm
just going to write here also the checked out attribute.
And, I think that's it as far as I'm
concerned. Is there anything that you think is missing?
>> Well, I do have a question. Would checked out,
better not be the case that someone can check out a reference book.
>> Oh, I see, I see.
>> Okay. I mean, it's only the books and
the audio visual material that can be checked out.
>> Right, right, right. Okay, so I, I guess, well the way I will fix that is,
I'll probably put yet another attribute in the item class, and I'll
call it loanable. And basically, this attribute is just telling us whether
an item is loanable or not. So, when it's not true and
loanable is not on. Basically, that item can be checked out.
>> Okay. And, the system would know this.
>> The system will know that.
>> And prevent it from happening.
>> And prevent it from happening. Okay?
>> Alright.
>> Perfect. So, we're going to do that and, any other objections,
any other?
>> No, that was my question.
>> Okay, perfect, so what I'm going to do next, I
mean, I haven't mentioned that yet, but you know classes right
now we just looked at the attributes right that give
you sort of the state of the class. And there's something
else, there's a second part of the class that is kind of
an orthogonal aspect, which is what the class can do. And we
call those operations. So normally these kinds also have operations, I
guess you know it would make sense to you as well.
And one way, one very natural way to
identify operations is to look at the requirements and
look for verbs. Because verbs associated with an item
will tell you basically what the item can do.
>> Okay.
>> So I, I'd like to go back to the requirements and
start, the same way in which we underlined, nouns, we're going to underline
verbs and we're going to see which ones of those verbs actually represent
actions that we want to represent explicitly, we want to model explicitly in
our class diagram.
>> Okay.