Okay so let me start underlining these nouns, and I'll start
identifying the ones that are relevant, and I'll ask you some
questions or you can ask me questions if
you see something that doesn't make sense to you. Good enough.
>> okay, let's see, patron. It seems to
me that patron is definitely an important entity.
>> That's, that's what its all about.
>> Okay, all right, so actually, the way
I'm going to do this, I'm going to take all these relevant
entities and I'm going to start putting them into what I call a class
diagram. So you don't really need to know what that is exactly, but imagine
this being a, a diagram in which I'm drawing, I represent in all development
items as rectangles with a given name and, and then later on some attributes.
>> Okay.
>> Okay, and I'm, I'm just going to put
them there. So I'm going to start with patron.
I'm going to create one class for the
patron. I'm going to give it the name patron.
And by the way, assuming that you'd probably figure out, it's important that we
represent, we use the right names so that it's clear when we're looking at
the class diagram what we're referring to, so I'll just use the, the nouns
themselves as names. Okay, library card seems to be also a relevant element.
>> Every patron has a library card.
>> All right, perfect, so we'll just
create a library card here. And let's see.
As, as long as they're in the system. And I saw that there's a system
here, this concept of system, this concept
of library. And based on my experience, normally,
those are kind of in an overarching themes. So this is really what we are
modeling. So the only
thing that will make a difference is
if there were more than one library or more than one system. Is that the case?
>> We just want one system for our one library
>> Okay so, in this case I won't even represent
those because basically what I'm representing is the system and
the library.
>> I understand, I understand.
Okay and then, oh name, address and phone
number are interesting because these are important entities,
but this seems like, you know, they're not
entities in themselves, so they're more attributes
of something else. I would imagine that
this is the way you identify, or these
are elements that are important for the patron?
>> That's what we take down when we issue the cards.
>> Okay. Perfect. So, I'm going to
take those and make those attributes of the patron, which means
that I'm going to take the class that I created before, and I'm
just going to write them down here so that they're represented and,
and we know that these are kind of what characterizes the patron.
>> Gotcha.
>> Okay? And then, I guess similar consideration for the library
card number. So this is to be associated with the library card?
>> It's printed right on it.
>> All right, so we'll put this as
an attribute of the library card, then. And then, in addition, at any particular point
in time. Okay, so time seems to be a relevant entity right,
because time seems to occur several times in this description. For example, I
think you guys keep track of how long a book has been loaned, right?
>> Right.
>> And there's some time associated also here.
>> And a children's age.
>> Oh yeah. The children's age here that
I didn't see before. Yeah. So, what
I'm going to do, I'm going to represent this in
a sort of generic way, as a date.
>> Okay.
>> These are kind of, kind of classes, utility
classes we call them, that are normally in every system.
>> Okay.
>> So I'm just going to put it down here
as a utility class that will be used
by different elements in the diagram. Okay, so
I want to calculate the items. So the items also
I mean I for what I know about libraries they
seem to be pretty relevant elements, right? So these are all
>> This is what we check out, this is what we're for.
>> Okay, so then items definitely will become a
class, and then we have a due. Oh there's also
this concept of fines. I guess that seems to be
important. Right? You guys give fines to people who are late.
>> Right, right.
>> Right, collect fines and so on. So we create a fine class down here and
the children. So children are special customers, right? It's
their age makes a difference? Is that the way it works?
>> Right. They, they can only check out a few books.
>> Okay. So I'll create them a special
kind of case, a special kind of customer so
I just create here a class for children. And
I can see that they're categorized by their age.
>> Right.
>> So I'll just put the age here as an attribute of the child.
And, okay, so the next one is
restriction. And restriction is kind of tricky because just
to be sort of a general concept. I mean,
in a sense, all of those are restrictions, right?
>> Right, this is just another one of these requirements.
>> Oh, okay, so, so we don't need to represent it explicitly, right?
>> Right, right.
>> It's just telling us how the children, yeah, okay, right; this is
just another requirement, so I just won't consider that for now. And oh,
I see that these books and audio video materials, I guess these
are things that the patrons can check out, right?
>> Those are some of the items, right.
>> There are two
more down here, right? Reference books and magazines?
>> But, they can't be checked
out, but they're definitely in the library.
>> Okay, so then I'm going to represent all of those
actually, now. So, I'm going to have books, I'm going to have audio
video materials, reference books, and magazines. And
I'm just going to have those as classes. Then,
okay here we have week, and we
already represented this general concept of time, so
week will be represented by the date class as well. And oh, I see best sellers.
So best sellers are also, I guess, items that can be checked out, right?
>> Right.
>> Okay, so I'll
just represent those as a class as well and an additional item that
is relevant for the library. And the limit, this is also a time limit, right?
>> Right.
>> So it can also be represented with a, with a class.
Oh, here we have cents, and for cents, same consideration that made
for time. This is kind of the money, is a general concept
that in all currency, many, in many IT systems. So, I'm, I'm
going to just have a money class here, which is another utility class.
>> Okay
>> Okay, and, oh, here I have value, so value is a property.
Let me look again at the requirement. Oh, it's the value of the item. So value
I'm going to put in the item as an attribute. Okay?
>> Okay. That's how much it cost us.
>> Okay. Perfect.
>> Seems like we got them all. Right? Anything I forgot?
>> That looks like it.
>> Okay, so this one, what I'd like to do. We have a kind of
a first take, first cut at the class diagram. I'd like to kind of
move to that and go through the different classes with you. And I'll ask
you some questions again. And you can
tell me whether there is something that
jumps at you that's not right. And
then we're going to try to refine that.
>> Okay
>> Okay.
>> Sounds good.