Domain Model and Contracts
Posted
by devoured elysium
on Stack Overflow
See other posts from Stack Overflow
or by devoured elysium
Published on 2010-06-16T03:44:31Z
Indexed on
2010/06/16
3:52 UTC
Read the original article
Hit count: 278
I am modelling a DVD Rental Store:
- A
Client
gives itsclientNumber
to theSystem
. - The
System
checks whenever the givenclientNumber
is valid. - The
Client
gives the name of theDVD
he wants to rent. - ...
n. ...I will later have to form an association between a new instance of "RentDVD" class concept to the current
Client c
.
My Domain Model is something like:
I've made the Contract for the first and second operations as:
Preconditions: none
Postconditions: there exists a Client c
such that c.clientNumber = clientNumber
.
Now, I don't know if I should form an association between this Client c
and the DVDStore(that I intend to use as front-end). If I don't make the association, how will I later be able to "reference" this same Client? Should I be making an association between Client and a different concept?
Thanks
© Stack Overflow or respective owner